Share » Forums » Setup & design » Detecting locations of a node? Is...

Detecting locations of a node? Is there any attribute.

Detecting locations of a node? Is there any attribute.

Wednesday 29 November 2006 4:54:20 am - 3 replies

Author Message

Kristian Hole

Wednesday 29 November 2006 9:13:46 am

Hi Ahmed,

The assigned nodes is available on the object.

Here is an example code that lists all the paths to the assigned nodes:

{foreach $node.object.assigned_nodes as $assignednode}
   {$assignednode.path_identification_string} <br />
{/foreach}

The $node variable has the following available information:
http://ez.no/doc/ez_publish/technical_manual/3_8/reference/objects/ezcontentobjecttreenode

The $node.object:
http://ez.no/doc/ez_publish/technical_manual/3_8/reference/objects/ezcontentobject

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Kristian Hole

Wednesday 29 November 2006 9:19:17 am

Actually. In your case, you might be able to use the "main_node_only" parameter to the "list" or "tree" fetch to only return the main node of your nodes.

See here:
http://ez.no/doc/ez_publish/technical_manual/3_8/reference/modules/content/fetch_functions/list

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Ahmed El Safty

Monday 04 December 2006 4:14:13 am

Hello Kristian,

Late but: THANK YOU!

the first solution worked well.

The main_node_only attribute would not work with the particular problem logic I have: I wanted to exclude all "Main Nodes" from the fetch, whose objects are encapsulated by another node (different location).

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu