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.