use of $node.node_is

Author Message

Pascal France

Monday 07 August 2006 10:52:14 am

Hi,

I'm building a menu in order to include it in the toolbar list.
I have this code:

{let top_cat=84 used_node=false()}
{set used_node=84}
<div class="haut_{$type_color}">
<h3>{$title}</h3>
</div>
<ul class="{$type_color}">{* ul_1 *}

{def $base=fetch( 'content', 'node', hash( 'node_id', 84 ) )}

With this code it is the children of the node 84 which are displayed
I would like to display the children of the current node. So I tried this code:

{let top_cat=$node.node_id used_node=false()}
{set used_node=$node.node_id}
<div class="haut_{$type_color}">
<h3>{$title}</h3>
</div>
<ul class="{$type_color}">{* ul_1 *}

{def $base=fetch( 'content', 'node', hash( 'node_id', $node.node_id ) )}

...but this works only one time and if I clean all caches.
So I tried:

{let top_cat=fetch(content, node, hash( node_id, $module_result.node_id)) used_node=false()}
<h3>{$top_cat}</h3>
{set used_node=fetch(content, node, hash( 'node_id', $module_result.node_id ) ) }
<h3>{$used_node}</h3>
<div class="haut_{$type_color}">
<h3>{$title}</h3>
</div>
<ul class="{$type_color}">{* ul_1 *}

{def $base=fetch( 'content', 'node', hash( 'node_id', $module_result.node_id ) )}

..but this doesn't work.

Regards

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

David Jones

Friday 11 August 2006 3:28:15 am

Did you find a soultion to this issue?

I too would like to display a list of children for the current node.

Thanks

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 19 2025 00:26:46
Script start
Timing: Jan 19 2025 00:26:46
Module start 'layout'
Timing: Jan 19 2025 00:26:46
Module start 'content'
Timing: Jan 19 2025 00:26:46
Module end 'content'
Timing: Jan 19 2025 00:26:46
Script end

Main resources:

Total runtime0.6833 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0077 587.9063152.6250
Module start 'layout' 0.00770.0032 740.531339.4297
Module start 'content' 0.01090.6709 779.9609492.0469
Module end 'content' 0.68180.0015 1,272.00788.1875
Script end 0.6833  1,280.1953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.5080160.0002
Check MTime0.00130.1945160.0001
Mysql Total
Database connection0.00110.161610.0011
Mysqli_queries0.635793.0367540.0118
Looping result0.00060.0934520.0000
Template Total0.643094.120.3215
Template load0.00210.300820.0010
Template processing0.640993.791020.3204
Template load and register function0.00010.017110.0001
states
state_id_array0.00110.153810.0011
state_identifier_array0.00090.133520.0005
Override
Cache load0.00170.2470200.0001
Sytem overhead
Fetch class attribute can translate value0.00060.081220.0003
Fetch class attribute name0.00100.150120.0005
XML
Image XML parsing0.00020.029420.0001
class_abstraction
Instantiating content class attribute0.00000.000920.0000
General
dbfile0.00170.2479100.0002
String conversion0.00000.001540.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/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: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs