show_children_of MenuManager
show_children_of MenuManager
How do you change show_children_of to show only the first level and not any sub level?
Re: show_children_of MenuManager
There are a lot of parameters inside modules help
!!!
Search for number_of_levels.

Search for number_of_levels.
Re: show_children_of MenuManager
Yeah, I tried that and when I use this it works, but shows the child of the start page:
When I use this with the number of levels, it gives me a blank space, no menu at all.
Code: Select all
{cms_module module='menumanager' start_page='Parents' template='show_children_of'}
Code: Select all
{cms_module module='menumanager' start_page='Parents' template='show_children_of' number_of_levels='1'}
Re: show_children_of MenuManager
I just got this from the doc area. So maybe I just don't know what I need to change to get that to work.
Code: Select all
{if $count > 0}
{foreach from=$nodelist item=node}
{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->index != 0}
<li><a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a></li>
{$node->titleattribute}
{/if}
{/foreach}
{/if}
Re: show_children_of MenuManager
Are you sure template is complete?
In the first part I can see some assigns for var icon but it isn't used in the second part ...
In the first part I can see some assigns for var icon but it isn't used in the second part ...
Re: show_children_of MenuManager
I'm clueless on this one. I just got the code from here:
http://wiki.cmsmadesimple.org/index.php ... hildren_of
http://wiki.cmsmadesimple.org/index.php ... hildren_of
Re: show_children_of MenuManager
You should be sure to copy complete template - found thisgiggler wrote:Code: Select all
<li><a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a></li> {$node->titleattribute}
url}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}
{$node->titleattribute}
Re: show_children_of MenuManager
I took that off since I don't need any icons. The menu shows, but it shows children of children as well and when using number of levels, the menu does not show at all. I would like to have only the first level of the menu shown. Any ideas?
Re: show_children_of MenuManager
Why you wont use MenuManagers template "simple_navigation' ?giggler wrote: I would like to have only the first level of the menu shown. Any ideas?
That's IMHO all you need

Call it with parameter number_of_levels='1'.
Re: show_children_of MenuManager
I used that before and the shows the parent link as well:
parent
sub 1
sub 2
sub 3
Finally, I changed the level to 2 from 1 and it works the way I want it to now. I didn't think it counted the parent as a level, so I was using 1:
Thanks for your help - otherwise I would have given up and left it as is!
parent
sub 1
sub 2
sub 3
Finally, I changed the level to 2 from 1 and it works the way I want it to now. I didn't think it counted the parent as a level, so I was using 1:
Code: Select all
{cms_module module='menumanager' start_page='Parents' template='show_children_of' number_of_levels='2'}