Tree menu

Author Message

Matej Franc

Sunday 24 August 2003 12:32:15 pm

I want use tree menu for navigation trought my site. This mean that my tree menu must be able to show all subfolders and infopages, articles, product informations, but not links ect…
Have someone idea how can I solve this.
Thanx

Bjørn Kaarstein

Monday 25 August 2003 2:37:29 am

This might help you. It does a tree fetch, and creates a simple tree based structure. As you can see, this only goes for folders.

{let folderlist=fetch('content', 'tree' ,hash('parent_node_id', 2,
'class_filter_type', include,
'class_filter_array', array(1)))}
<div align="center">

<table border="1" width="150" bgcolor="#f6f6f6" cellpadding="1" cellspacing="0" align="center">

{section name=menu loop=$folderlist}

{switch match=$menu:item.depth}

{case match=2}
{section show=eq($menu:index, 0)}
</td></tr>
{/section}
<tr>
<td>
 <a href={$menu:item.url_alias|ezurl}>{$:item.name}</a>

{/case}

{case match=3}
{section show=and($node.depth|ge(2),eq($menu:item.parent_node_id, $node.path_array.2))}

 <a href={$menu:item.url_alias|ezurl}><br />  -- {$:item.name}</a>

{/section}
{/case}

{case match=4}
{section show=and($node.depth|ge(3),eq($menu:item.parent_node_id, $node.path_array.3))}

 <a href={$menu:item.url_alias|ezurl}><br />    --- {$:item.name}</a>

{/section}
{/case}

{/switch}
{/section}
</td>
</tr>
</table>
</div>
{/let}

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.