Section question

Author Message

Glenn MacGregor

Wednesday 21 April 2004 7:05:19 am

Hi All,

Is there a query I can do to tell me the section that a certain node is in? I need to have a dynamic menu based on section (products, support, etc.). So hoiw can I get the section from a node to build the menu?

Thanks

Glenn MacGregor

Alex Jones

Wednesday 21 April 2004 7:31:14 am

<i>{$module_result.section_id}</i> or <i>{$DesignKeys:used.section}</i> should do it.

Also, so you know you can use <i>|attribute(show)</i> to view all of the available attributes for an item. For example, to see all of the attributes for the current node you can add <i>{$node|attribute(show)}</i> to your template.

More info:
Template variables set by ezPublish: http://ez.no/ez_publish/documentation/customization/custom_design/template_variables_set_by_ezpublish
Miscellaneous (includes attribute info): http://ez.no/ez_publish/documentation/development/libraries/ez_template/operators/miscellaneous

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

K259

Wednesday 21 April 2004 7:37:42 am

Alex,
I've tried to list all the attributes in our system in many pages(templates), but I don't get any results..do I have to turn it on somewhere?

In a demo-installation this works fine, but not on our site :/

Any tip?

Alex Jones

Wednesday 21 April 2004 8:01:46 am

Hrrrm, that may be due to having caching enabled. Try an alternate way of viewing the attributes. You can try using <i>{$module_result.node_id|attribute(show)}</i> within a template or <i>{$:item|Attribute(show)}</i> within a loop.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

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 04:29:48
Script start
Timing: Jan 31 2025 04:29:48
Module start 'layout'
Timing: Jan 31 2025 04:29:48
Module start 'content'
Timing: Jan 31 2025 04:29:49
Module end 'content'
Timing: Jan 31 2025 04:29:49
Script end

Main resources:

Total runtime0.9957 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 588.0156151.1953
Module start 'layout' 0.00540.0022 739.210936.6172
Module start 'content' 0.00760.9873 775.8281972.4141
Module end 'content' 0.99480.0008 1,748.242211.8750
Script end 0.9956  1,760.1172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.2930160.0002
Check MTime0.00120.1245160.0001
Mysql Total
Database connection0.00080.084810.0008
Mysqli_queries0.942894.6918620.0152
Looping result0.00050.0537600.0000
Template Total0.963296.720.4816
Template load0.00220.220620.0011
Template processing0.961096.522620.4805
Template load and register function0.00160.157010.0016
states
state_id_array0.00090.086710.0009
state_identifier_array0.00120.123020.0006
Override
Cache load0.00180.1769240.0001
Sytem overhead
Fetch class attribute can translate value0.00050.045730.0002
Fetch class attribute name0.00190.191850.0004
XML
Image XML parsing0.00080.075530.0003
class_abstraction
Instantiating content class attribute0.00000.002860.0000
General
dbfile0.00110.1102160.0001
String conversion0.00000.000640.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/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
2content/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: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs