Published in: PHP
URL: http://drupal.org/node/218844
This code snippet make use of the API to accomplish a block with links to related content.
<?php $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) { foreach($nodes as $node) { $links[] = l($node->title, "node/$node->nid"); } $title = relatedcontent_group_title($group, $grouped, $host_node->type); } } } } ?>
You need to login to post a comment.
