I am looking for a way to make our menu produce sub menus. The code for the menu is shown below and is a provided one in Menu Manager.
The code is:
{if $count > 0}
<div id="menuwrapper">
<ul id="primary-nav">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" 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 and $node->haschildren == true)}
<li><a
{elseif $node->current == true}
<li><a
{elseif $node->haschildren == true}
<li><a
{elseif $node->type == 'sectionheader'}
<li><span> {$node->menutext} </span>
{elseif $node->type == 'separator'}
<li style="list-style-type: none;"> <hr class="separator" />
{else}
<li><a
{/if}
{if $node->type != 'sectionheader' and $node->type != 'separator'}
href="{$node->url}"
{if $node->accesskey != ''}accesskey="{$node->accesskey}" {/if}
{if $node->tabindex != ''}tabindex="{$node->tabindex}" {/if}
{if $node->titleattribute != ''}title="{$node->titleattribute}"{/if}
{if $node->target ne ""} target="{$node->target}"
{/if}>{$node->menutext}</a>
{/if}
{/foreach}
{repeat string="</li>" times=$node->depth-1}</li>
</ul>
</div>
{/if}
Drop Down Menu
Re: Drop Down Menu
Do you haves pages with children..?
Does the menu tag in the tag in the template say number_of_levels='1'..?
Are you using a drop down menu stylesheet..?
More info = More help
Does the menu tag in the tag in the template say number_of_levels='1'..?
Are you using a drop down menu stylesheet..?
More info = More help
Re: Drop Down Menu
Hi. Thanks for your reply. You will have to forgive me if I struggle a bit as I am a beginner at this.
Yes, I have pages with children.
If you mean this part of the template, there is no reference to levels at all.
<div id="menu">
<div class="menu_wrapper">
{menu template='Roundwood-menu' collapse='0'}
</div>
I think the stylsheet is what I am looking for, because the menu is only displaying as a single level menu.
Yes, I have pages with children.
If you mean this part of the template, there is no reference to levels at all.
<div id="menu">
<div class="menu_wrapper">
{menu template='Roundwood-menu' collapse='0'}
</div>
I think the stylsheet is what I am looking for, because the menu is only displaying as a single level menu.
Re: Drop Down Menu
What version of CMSMS are we talking about?
Re: Drop Down Menu
it's 1.11.7 "Genovesa"
Re: Drop Down Menu
Better first move to the latest version of cmsms; there is a difference in the approach on how to build a menu between the earlier and the later version of cmsms.
- PinkElephant
- Forum Members
- Posts: 169
- Joined: Fri Feb 06, 2009 2:08 pm
Re: Drop Down Menu
As suggested, definitely upgrade if you can -- do it even if your can't . But if you're *really* stuck on 1.* ...
It's hard to believe that 1.11.7 shipped with the template you quoted. It's testing for sub-menu items, etc but doing nothing...
(I can't remeber 1.* too well but there might be an option to 'Reset' the template to factory-default).
It's hard to believe that 1.11.7 shipped with the template you quoted. It's testing for sub-menu items, etc but doing nothing...
Code: Select all
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
<li><a
{elseif $node->current == true}
<li><a
{elseif $node->haschildren == true}
<li><a
{elseif $node->type == 'sectionheader'}
<li><span> {$node->menutext} </span>
{elseif $node->type == 'separator'}
<li style="list-style-type: none;"> <hr class="separator" />
{else}
<li><a
{/if}