Page 1 of 1

MenuManager Bug

Posted: Sat Jun 25, 2011 2:42 pm
by Foaly*
There's a bug in the MenuManager module.. I'm currently searching it, but perhaps someone else already knows where it is.

Structure of my test page:
2 root
2.1 child1
2.1.1 subchild1
2.2 child2

the markup:
{menu childrenof='root'}

the menu template:
<ul>
{foreach from=$nodelist item=node}
<li>{$node->depth} {$node->menutext}</li>
{/foreach}
</ul>

the result:
* 1 child1
* 2 subchild1
* 0 child2

Re: MenuManager Bug

Posted: Sat Jun 25, 2011 3:03 pm
by Foaly*
I use this as an ugly work-around:
{assign var="temp" value='.'|explode:$node->hierarchy}
{assign var="depth" value=$temp|@sizeof}
{assign var="depth" value=$depth-1}

Re: MenuManager Bug

Posted: Mon Jun 27, 2011 11:18 am
by uniqu3
Cant confirm this behavior used {menu childrenof='some page'} containg two sub pages each with children and my output is:

1.1
1.1.1
1.1.2
1.2
1.2.1
1.2.2

This looks correct to me. Used standard simple_navigation sample template.

Re: MenuManager Bug

Posted: Mon Jun 27, 2011 3:59 pm
by Foaly*
Okay, I've also tried it with simple_navigation now.
The instance var hierarchy works quite fine, so does not depth. Please replace hierarchy by depth and test again.

Re: MenuManager Bug

Posted: Mon Jul 11, 2011 12:55 am
by Foaly*