Forums / Setup & design / Problem with tree menu

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Problem with tree menu

Author Message

Joshep Velez

Tuesday 14 June 2005 4:44:17 am

Hi, first of all, sorry for my English, I hope you understand me.

I did a tree menu with the code that somebody has posted several months ago:

{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>
&nbsp;<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))}

&nbsp;<a href={$menu:item.url_alias|ezurl}><br /> &nbsp;-- {$: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))}

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

{/section}
{/case}


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

It works correctly with Exponential 3.5 but I had to change to the 3.6 version due to another problems. When I have restablished all, this code doesn&acute;t work well. You can see that at http://interclassica.um.es When I click for the first time, for example, at "Investigación", it works, but when I click another link and then I click another time at "Investigación", it doesn&acute;t work. What's the problem? I hope your help! Thanks!