Need help with filtering out sections when useing treemenu

Author Message

Kjell Arne Espedal

Friday 25 February 2005 4:31:31 am

The problem is that I got a couple of folders in root that should not be a part off the menu.

Example:
folder1 - section1
folder2 - section2
folder3 - section3
folder4 - section3
folder5 - section3

What I want is to list the 3 folders that is in section 3 but not the others

{let subMenu=treemenu( $module_result.path, 
                        $module_result.node_id,
			array('folder','article'), 0, 2 )}

{section var=menu loop=$subMenu}
      <div class="colMenu{$menu.item.level}">
          <a href={$menu.item.url_alias|ezurl}>{$menu.item.text}</a>
      </div>
{/section}
{/let}

Suggestions to make this code work as mentioned above is highly appreciated.
I'm using eZ Publish version 3.5

Ɓukasz Serwatka

Monday 28 February 2005 10:47:08 pm

{let subMenu=treemenu( $module_result.path, 
                        $module_result.node_id,
			array('folder','article'), 0, 2 )
	sectionIds=array( 5, 4, 123 ) } {*section ids to display*}

{section var=menu loop=$subMenu}
	{let nodeData=fetch(content, node, hash( node_id, $menu.id ) )}
	{section show=$sectionIds|contains( $nodeData.object.section_id )}
		<div class="colMenu{$menu.item.level}">
          		<a href={$menu.item.url_alias|ezurl}>{$menu.item.text}</a>
     		</div>	
	{/section}
	{/let}
{/section}
{/let}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

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:14:42
Script start
Timing: Jan 31 2025 04:14:42
Module start 'layout'
Timing: Jan 31 2025 04:14:42
Module start 'content'
Timing: Jan 31 2025 04:14:43
Module end 'content'
Timing: Jan 31 2025 04:14:43
Script end

Main resources:

Total runtime0.9704 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.0041 588.3828151.2422
Module start 'layout' 0.00410.0026 739.625036.7109
Module start 'content' 0.00670.9629 776.3359924.6484
Module end 'content' 0.96970.0007 1,700.98447.7813
Script end 0.9704  1,708.7656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.3095160.0002
Check MTime0.00130.1292160.0001
Mysql Total
Database connection0.00050.053210.0005
Mysqli_queries0.923295.1338540.0171
Looping result0.00040.0445520.0000
Template Total0.920794.920.4604
Template load0.00190.200820.0010
Template processing0.918794.672420.4594
Template load and register function0.00130.133410.0013
states
state_id_array0.00350.357910.0035
state_identifier_array0.00230.240720.0012
Override
Cache load0.00160.1650170.0001
Sytem overhead
Fetch class attribute can translate value0.00090.088020.0004
Fetch class attribute name0.00270.275130.0009
XML
Image XML parsing0.00080.080520.0004
class_abstraction
Instantiating content class attribute0.00000.001230.0000
General
dbfile0.00310.3224180.0002
String conversion0.00000.000540.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
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs