Forums / Developer / Fetch main node ID in relation / Comment46419
Philipp Kamps
Monday 31 July 2006 3:51:59 pm
Hi Pål,
I'm not a 100% sure what exactly the problem is. Maybe thisinformation helps you:
{def $related_object_node_id = 0 } {foreach $node.data_map.objectrelations.content.relation_list as $related_object} {set $related_object_node_id = $related_object.node_id} Contains related objects with node_id: {$related_object_node_id}<br /> {/foreach}
So my class has an attribute with the datatype "objectrelationlist" with the name "objectrelations". As you can see, I get all related objects in the foreach-loop.
Each $realted_object is an array with additional information. For example, you can read the "node_id". This node_id is always the main_node_id.
Let me know if this feedback helps or if you need more information.
Regards
http://www.mugo.ca Mugo Web, eZ Partner in Vancouver, Canada