Wednesday 27 September 2006 4:08:45 am
Hi David fetching content tree returns an array of treenodes which are childnodes of the node you supply. As you provide a object id I think you should have even gotten some errors in the debug messages, so make sure you look there any time something does not work as expected. If you truly want to fetch the url to an object (and not a node) you use
{def $object= fetch('content', 'object', hash('object_id', $object_id))}
The link to this object is not necessarily clearly defined as an object can have several nodes assigned to it. Most likely you want to link to the main node:
<a href = {$object.main_node.url_alias|ezurl()}>{$object.name}</a>
If you want to fetch a single node you use
{def $node = fetch('content', 'node', hash('node_id', $node_id))}
The link to this node is then:
<a href={$node.url_alias|ezurl()}>{$node.name}</a>
Greetings from Luxembourg Claudia
|