Retrieving the node_id always at the same depth ?

Author Message

Nabil Alimi

Tuesday 28 June 2005 1:52:50 am

Hi,

Is there a way to always fetch at the same depth ?

I mean, I've got a site that looks like this :

- root

-- sub folder

--- subsub folder

---- subsubsub folder

Wherever I am, I'd like to retrieve the level 2 node. I've been thinking of making :

{section show=$the_node.depth|ne(2)}
    {set scope=global $the_node=$the_node.parent_node_id}
{/section}

But can I make a loop if there's no array ?
I haven't seen any "while" operator in EzPublish...

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr

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 18 2025 16:16:18
Script start
Timing: Jan 18 2025 16:16:18
Module start 'layout'
Timing: Jan 18 2025 16:16:18
Module start 'content'
Timing: Jan 18 2025 16:16:18
Module end 'content'
Timing: Jan 18 2025 16:16:18
Script end

Main resources:

Total runtime0.0174 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 588.0469152.6406
Module start 'layout' 0.00630.0041 740.687539.4766
Module start 'content' 0.01040.0049 780.164189.4922
Module end 'content' 0.01530.0021 869.656330.3047
Script end 0.0174  899.9609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003017.2763140.0002
Check MTime0.00158.7201140.0001
Mysql Total
Database connection0.00084.573210.0008
Mysqli_queries0.003218.495130.0011
Looping result0.00000.120210.0000
Template Total0.00179.810.0017
Template load0.00095.158010.0009
Template processing0.00084.573210.0008
Override
Cache load0.00063.581210.0006
General
dbfile0.00031.524980.0000
String conversion0.00000.062940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs