views:

70

answers:

1

What I need to do is bring data from a field in a "parent" node to a "child" node. Something like the following:

$myactive_trail = menu_get_active_trail();
$parent = $myactive_trail['2']['link_path'];
print $parent->field_video['0']['filepath'];

I know that there is not such thing as a parent not hence me trying to use menu_get_active_trail(). I can print the $parent link_path, but don't know how to call up a field from the parent node.

+1  A: 

I was in a similar position. CCK Node references are quite useful, and actually rather simple once you know how to manipulate them. If I understand your question correctly... I believe you want to add parts of the "parent" node type when you display the "child" node type. If that's right, there is a tutorial video that explains how to do EXACTLY that. It also gives pointers on actually setting up a CCK node reference.

http://geoffhankerson.com/drupal/cck-nodereference-screencast.html

Hope this helps!

Chaulky
Thanks Chaulky!! That's exactly what I needed!!!
Erik
I felt the exact same way when I found it :)
Chaulky