Page 1 of 1

Menu Manager - excludeprefix / parent class

Posted: Fri Aug 12, 2011 2:25 am
by ptysell
Cant seem to figure this out.

I am trying to exclude certain pages which I load into a tabbed content block via ajax/menu manager.

That works fine.

I am however running into a small problem.
On my main sub navigation menu, I can use the excludeprefix when calling menu manager to exclude the items BUT menu manager is still attaching the "parent" class to the LI item.

When I run the "count" template provided in the Menu Manger template section on this site, it returns 0 when using the excludeprefix tag.

Here is my menu code. It is very basic.

Code: Select all

{assign var='number_of_levels' value=10000}
{if isset($menuparams.number_of_levels)}
  {assign var='number_of_levels' value=$menuparams.number_of_levels}
{/if}

{if $count > 0}
<ul class="navigation-content">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string='<ul class="unli">' times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string='</li></ul>' times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}

{if $node->parent == true or $node->current == true}
  {assign var='classes' value='active'}
  {if $node->parent == true}
    {assign var='classes' value='active parent'}
  {/if}
  {if $node->children_exist == true and $node->depth < $number_of_levels}
    {assign var='classes' value=$classes|cat:' parent'}
  {/if}
  <li class="{$classes}"><a class="{$classes}" 
{elseif $node->type == 'sectionheader' and $node->haschildren == true}
  <li class="parent"><a class="parent"><span class="sectionheader">{$node->menutext}</span></a>
{elseif $node->type == 'sectionheader'}
  <li><a ><span class="sectionheader">{$node->menutext}</span></a>
{elseif $node->type == 'separator'}
  <li style="list-style-type: none;"> <hr class="menu_separator" />
{elseif $node->children_exist == true and $node->depth < $number_of_levels and $node->type != 'sectionheader' and $node->type != 'separator'}
  <li class="parent"><a class="parent" 
{else}
  <li>
  <a 
{/if}

{if ($node->type != 'sectionheader' and $node->type != 'separator') or $node->parent == true or $node->current == true }
 {if $node->target}target="{$node->target}" {/if}
href="{$node->url}"><span>{$node->menutext}</span></a>
{/if}
{/foreach}
{repeat string='</li></ul>' times=$node->depth-1}
</li>
</ul>
<div class="clearb"></div>
{/if}
Everything displays fine, it is just attached the parent class to the top level of the menu even when I use the excludeprefix to exclude all of the children.