Visualization of a main node (node father)

Author Message

Rafael Andres Gonzalez Lopez

Wednesday 24 August 2005 7:54:23 am

Good... I have a problem...
I need to visualize (to (show) the name (attribute) of the previous node to which(who) a user this one located, that is to say, from a certain node I need to open the name of the previous node or father of this one.

With this instruction I know the node father:

{$main_node_id}

Without embardo wanted it is to know the name of the attribute, not his(her,your) number...

Besides it he wanted to come to the previous node or father of the above mentioned node by means of a hyperlink, to avoid to press the button of behind of the browser...

Well, in advance thank you for the help...

Ekkehard Dörre

Wednesday 24 August 2005 9:30:14 am

This might help:

http://ez.no/products/ez_publish_cms/documentation/incoming/how_to_find_the_parent_and_grandparent_of_an_object

Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Rafael Andres Gonzalez Lopez

Wednesday 24 August 2005 11:02:20 am

Thanks Ekke...

In him connect that you gave me solve the problem of showing the name of the previous node of the following way:

{let current=fetch('content','node',hash('node_id',$node.node_id))
parent=fetch('content','node',hash('node_id',$:current.object.main_parent_node_id))
grandparent=fetch('content','node',hash('node_id',$:parent.object.main_parent_node_id))}

{$:grandparent.name}
{$:parent.name}
{$:current.name}

{/let}

Nevertheless I am necessary to create a link that allows me to open the nodes by means of a hyperlink, something this way like:

<a href={" "|ezurl}>{$:grandparent.name}</a>
<a href={" "|ezurl}>{$:parent.name}</a>

The detail is that not that to put in the "href".

Thank you in advance for any other help...

Kristof Coomans

Wednesday 24 August 2005 10:55:12 pm

You can use the attribute url_alias of a node to make a link to it.

<a href={$:grandparent.url_alias|ezurl}>{$:grandparent.name}</a>
<a href={$:parent.url_alias|ezurl}>{$:parent.name}</a>

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Rafael Andres Gonzalez Lopez

Thursday 25 August 2005 11:09:55 am

Thanks Kristof...

Now everything works well...

Bertrand Dunogier

Sunday 28 August 2005 11:02:40 am

Once you have a node fetched, aren't you supposed to be able to use {$node.parent} as many times as you want ??

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.