Project:RelatedContent
Version:6.x-1.0-beta1
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)
Issue tags:imagecache, related content

Issue Summary

I used this code for a related content block (which I found in your handbook):

<?php
<?php
if (arg(0) == 'node' && is_numeric($nid = arg(1))) {
 
$host_node = node_load($nid);
 
$grouped = relatedcontent_variable_output_grouped($host_node->type);
  if(
$groups = relatedcontent($host_node, $grouped)) {
    foreach(
$groups as $group => $nodes) {
      if (
$nodes) {
       
$links = array();
        foreach(
$nodes as $node) {
         
$links[] = l($node->title, "node/$node->nid");
        }
       
$title = relatedcontent_group_title($group, $grouped, $host_node->type);
        print
theme('item_list', $links, $title);
      }
    }
  }
}
?>

This works great...but it's not very visually stimulating. I would like to also like to display the first thumbnail from inside the image field inside this cck node. It's an imagecache field. Any suggestions?

And while we're at it, what's the best way to reference and display the other fields from inside the node inside this block?

Sorry, this is all probably very easy for you, but I'm not an experience php/drupal person.

Thanks in advance!

Comments

#1

This is a double post. Please delete me.

#2

Status:active» closed (fixed)
nobody click here