how to show a context-dependent navigation bar?

Author Message

nicola muratori

Tuesday 03 June 2003 6:03:22 am

hi

i have a content structure like this:

....
A (class 1)
B (class 2)
C (class 3)
D (class 4)

and so on. i have to build a navigation bar to show, for examples, all objects under A, even when i'm viewing B, C or D.

there will be many structures like this in my content tree. so i have to
make this dynamic without specifying the object id of A.

i've tried to use the path object to fetch the first occurrence in the navigation tree, but i don't know how to get the class and the node id of the path element.

any ideas?

Frode Marton Meling

Wednesday 04 June 2003 11:58:03 pm

My suggestion would be to look at the SiteMap template inside standard, and then apply different class filters to the fetch.

Fetch Example:
{section name=test loop=fetch(content,tree,hash(parent_node_id,1,depth,10,class_filter_type,exclude,class_filter_array,array(2)))}

your usage of the fetch
{/section}

This example will loop through all objects but those with class_id=2.
If I only wanted to show class A and class B (ID=10,11) the fetch would look like this fetch(content,tree,hash(parent_node_id,1,depth,10,class_filter_type,include,class_filter_array,array(10,11)))

hope this helps you

MartOn

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

Main resources:

Total runtime0.6844 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.0045 588.0469152.6406
Module start 'layout' 0.00450.0029 740.687539.4922
Module start 'content' 0.00740.6754 780.1797463.5859
Module end 'content' 0.68280.0015 1,243.76568.1250
Script end 0.6843  1,251.8906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4737160.0002
Check MTime0.00130.1837160.0001
Mysql Total
Database connection0.00060.085010.0006
Mysqli_queries0.637893.1915540.0118
Looping result0.00060.0858520.0000
Template Total0.659096.320.3295
Template load0.00190.282120.0010
Template processing0.657096.000120.3285
Template load and register function0.00020.022810.0002
states
state_id_array0.00040.057910.0004
state_identifier_array0.00100.147720.0005
Override
Cache load0.00160.2335250.0001
Sytem overhead
Fetch class attribute can translate value0.00080.117320.0004
Fetch class attribute name0.00180.261020.0009
XML
Image XML parsing0.00050.074020.0003
class_abstraction
Instantiating content class attribute0.00000.000920.0000
General
dbfile0.00060.0830100.0001
String conversion0.00000.000840.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
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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: 5

Time used to render debug report: 0.0002 secs