Hi,
I am working on theming a content type that uses a node reference and I would like to be able to access some content within the other content type that it is referencing.
Here are the details:
The content type is "press" and it references a content type "download". In the press template (node-press.tpl.php) I want to be able to print a direct link to a file that has been added to the download content type being referenced. However, when I look at the available variables with print_r($node) in node-press.tpl.php I only find a link to the entire download node that is referenced, but not to any of the specific content within it.
I know that when you want to access variables for the user you can global $user, is there a similar function so i can essentially global $node->type['download'] so I can grab elements from with that node??
Or is this something that I can set up in a preprocess function?
Any direction would be greatly appreciated
developing in Drupal 6.14
Thanks,
Andy :)

Comments
Using Views to access the
Using Views to access the other content and display it in a Block or Panel (see "Panels" module) could be one approach.
CiviCRM specialist
Great idea... I hadn't
Great idea... I hadn't thought of that approach, I am still learning the ins and outs of views, but I think I will be able to get it to do what I need.
Thanks,
Andy
Alternatively use
Alternatively use views_attach to bring the content from the referenced node into the node template itself.
Or use a preprocess function in a module or theme to do a full node_load on the $nid of the referenced node, and pass that to your template, and use appropriate functions to theme it there. Bonus points for doing all the processing in the preprocess function and returning variables to your template that require nothing more than a simple
print $foostatement.So simple even a senior
So simple even a senior developer could do it!
Just kiddin around!
CiviCRM specialist