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.

eZ debug

Timing: Jan 31 2025 01:24:45
Script start
Timing: Jan 31 2025 01:24:45
Module start 'layout'
Timing: Jan 31 2025 01:24:45
Module start 'content'
Timing: Jan 31 2025 01:24:46
Module end 'content'
Timing: Jan 31 2025 01:24:46
Script end

Main resources:

Total runtime0.9039 sec
Peak memory usage8,192.0000 KB
Database Queries70

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 588.2656151.2266
Module start 'layout' 0.00760.0049 739.4922220.7188
Module start 'content' 0.01260.8904 960.21094,553.9453
Module end 'content' 0.90300.0008 5,514.156315.8125
Script end 0.9038  5,529.9688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.4212160.0002
Check MTime0.00130.1436160.0001
Mysql Total
Database connection0.00100.111310.0010
Mysqli_queries0.805289.0862700.0115
Looping result0.00080.0851680.0000
Template Total0.847693.820.4238
Template load0.00180.196620.0009
Template processing0.845893.582520.4229
Template load and register function0.00160.179410.0016
states
state_id_array0.00120.129310.0012
state_identifier_array0.00130.141520.0006
Override
Cache load0.00160.1731390.0000
Sytem overhead
Fetch class attribute can translate value0.00190.213640.0005
Fetch class attribute name0.00230.258280.0003
XML
Image XML parsing0.00230.255140.0006
class_abstraction
Instantiating content class attribute0.00000.002180.0000
General
dbfile0.00210.2313220.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs