Author Topic

Denis Igin

Thursday 02 February 2006 2:31:59 am

Comment32684

Comments for an speed boost and lowering number of fetches / sql quries from http://ez.no/doc/ez_publish/technical_manual/3_6/templates/information_extraction/outputting_node_and_object_data#comment2472

If you need to display some information about the children or grand children in the node template this is possible with $node.children and $node.children.0.children (if any children exist this will loop thru any children of your first child)
To loop thru children:

{foreach $node.children as $nodechild}
  {$nodechild.url_alias|ezurl}
  {$nodechild.name}
  {$nodechild.node_id}
{/foreach}

The same thing can be done with parents: $node.parent

Remember to only use $node in node templates and not in your pagelayout file.
Because it's not available on cached pages (ViewCaching).

NXC - OPEN RELIABLE