Forums / General / Need help with filtering out sections when useing treemenu
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 - section3folder5 - 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 Exponential 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