treemenu at root level doesn't set is_selected attribute

Author Message

Christof Bollenbeck

Tuesday 07 September 2004 10:05:08 am

The following code

{let topMenu=treemenu($module_result.path,2,array('folder'),1,2)}
    <ul>
      {section var=TopMenuItem loop=$topMenu}
         <li><a {$TopMenuItem.item.is_selected|choose('','class="selected"')} href={$TopMenuItem.item.url_alias|ezurl} title="{$TopMenuItem.item.text}">{$TopMenuItem.item.text}</a></li>
      {/section}
   </ul>
{/let}

delivers a proper top level menu but does not set the is_selected attribute. Therefore the 'class="selected"' option in the a-tag is never chosen.

The following code for sub menus works correctly also with reference to the is_selected attribute:

{let LeftMenu=treemenu($module_result.path,$module_result.node_id,array('article'),1,6)}
    {section var=LeftMenuItem loop=$LeftMenu}
        <li><a {$LeftMenuItem.item.is_selected|choose('','class="selected"')} href={$LeftMenuItem.item.url_alias|ezurl} title="{$LeftMenuItem.item.text}">{$LeftMenuItem.item.text}</a></li>
    {/section}
{/let}	

Did I make anythink wrong or is this a bug in ezPublish?

Thanks in advance,
Christof

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

Main resources:

Total runtime0.7340 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 589.6016152.6563
Module start 'layout' 0.00490.0029 742.257839.5078
Module start 'content' 0.00790.7247 781.7656408.3906
Module end 'content' 0.73250.0014 1,190.15638.0938
Script end 0.7339  1,198.2500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4351160.0002
Check MTime0.00140.1890160.0001
Mysql Total
Database connection0.00090.121510.0009
Mysqli_queries0.698195.1174460.0152
Looping result0.00040.0531440.0000
Template Total0.706196.220.3531
Template load0.00220.299020.0011
Template processing0.703995.902320.3520
Template load and register function0.00010.016110.0001
states
state_id_array0.00170.235710.0017
state_identifier_array0.00070.092920.0003
Override
Cache load0.00180.2475110.0002
Sytem overhead
Fetch class attribute can translate value0.00040.059510.0004
Fetch class attribute name0.00060.081910.0006
XML
Image XML parsing0.00010.017710.0001
class_abstraction
Instantiating content class attribute0.00000.000410.0000
General
dbfile0.00070.0965100.0001
String conversion0.00000.001040.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
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/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: 10
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs