I am using the Contemplate module to format the display of various CCK content types. I have created a view to provide related content, but don't know how to display the selected nodes using Contemplate code. Can you advise?

Thanks

Comments

afsladmin’s picture

Status: Active » Fixed

I have now sorted this out, both for displaying relatedcontent using contemplate and for displaying attachments using contemplate. As hinted at in other posts elsewhere, this can be done by copying snippets of code from the relevant module and making some small changes.

For related content I have put:

<?php $tempnodes=array();
foreach ($node->nodes as $nid) {
      $tempnodes[] = node_load($nid);
    }
print theme_relatedcontent('', $tempnodes) ?>

For attachments I have put:

<?php if (isset($node->files) && user_access('view uploaded files')) {
        if (count($node->files)) {
          if (user_access('view uploaded files')) {
            print theme('upload_attachments', $node->files);
          }
        }
      }
?>
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.