Page 1 of 1

child entries not indenting with menu manager

Posted: Sun Aug 07, 2011 8:55 pm
by swarfega
Ive changed my menu to use the examples from http://wiki.cmsmadesimple.org/index.php ... nu_Manager but Im finding that secondary level menu links arent indenting.

the menu code:

Code: Select all

{if $count > 0}
<ul class="menu_horiz">
{foreach from=$nodelist item=node}
{if $node->depth != $node->prevdepth}
{if $node->depth > $node->prevdepth}
<ul>
{elseif  $node->depth < $node->prevdepth}
</li></ul>
{/if}
{elseif $node->index > 0}
</li>
{/if}

{if $node->index == 0}
{assign var="icon" value="house"}
{elseif $node->haschildren == true }
{assign var="icon" value="folder"}
{elseif $node->haschildren == false }
{assign var="icon" value="page"}
{/if}
{if $node->current == true}
<li style="list-style-image: url('/cms/images/icons/{$icon}_go.png') ">
{else}
<li style="list-style-image: url('/cms/images/icons/{$icon}.png') ">
{/if}
{if $node->type == 'sectionheader'}
<span class="sectionheader{$node->depth}">{$node->menutext}</span>
{else}
<a href="{if $node->id == 15}/{else}{$node->url}{/if}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a>
{/if}
{/foreach}
	{repeat string="</li></ul>" times=$node->depth-1}		</li>
	</ul>
{/if}
You can see the result http://thriplow.org.uk/cms/news.pc

Re: child entries not indenting with menu manager

Posted: Mon Aug 08, 2011 6:14 pm
by Dr.CSS
I would use one of the default menu templates and CSS to style this instead of trying that menu template, it doesn't seem to give you any UL UL items, everything is in one UL...

Re: child entries not indenting with menu manager

Posted: Mon Aug 08, 2011 7:46 pm
by swarfega
ok ill give that a shot.

Re: child entries not indenting with menu manager

Posted: Tue Aug 09, 2011 8:01 am
by swarfega
Managed to resolve this and still keep the above code.

Basically you need collapse=0 and use excludeprefix="" to list pages that you dont want listed.