Page 1 of 1

help with menu settings

Posted: Tue Oct 22, 2019 7:11 am
by mirecek
help with menu settings

Hello.
did anyone know how to edit the menu generator or menu template? I don't know how to set it to display as a dropdown menu.
I would be very grateful for any advice.
how to add a significant {menu}?
cmsms 1.11 ??? ??? ???


PAGE TEMPLATE
<div data-collapse="medium" data-animation="default" data-duration="400" class="navbar w-nav">
<div class="w-container">
<a href="#" class="brand w-nav-brand">
<div class="text-block">Logo</div>
</a>
<nav role="navigation" class="w-nav-menu">
<a href="#" class="nav-link-2 w-nav-link">Home</a>
<a href="#" class="nav-link-2 w-nav-link">About</a>
<div data-delay="0" data-hover="1" class="w-dropdown">
<div class="nav-link-2 w-dropdown-toggle">
<div class="w-icon-dropdown-toggle"></div>
<div>Dropdown</div>
</div>
<nav class="w-dropdown-list">
<a href="#" class="dropdown-link w-dropdown-link">Project 1</a>
<a href="#" class="dropdown-link w-dropdown-link">Project 2</a>
<a href="#" class="dropdown-link w-dropdown-link">Project 3</a>
<a href="#" class="dropdown-link w-dropdown-link">Project 4</a>
</nav>
</div><a href="#" class="nav-link-2 w-nav-link">Contact</a></nav>
<div class="w-nav-button">
<div class="w-icon-nav-menu"></div>
</div>
</div>
</div>

MENU GENERATOR TEMPLATE:
{if $count > 0}
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul class='dropdown-menu'>" 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->children_exist && $node->hierarchy|strstr:"."}
<li class="dropdown-submenu">
<a class="dropdown-toggle" data-toggle="dropdown" href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->titleattribute} </a>
{elseif $node->children_exist}
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="{$node->url}" title="{$node->menutext}" {if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext} </a>
{else}
<li><a href="{$node->url}" title="{$node->menutext}" {if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext} </a>
{/if}

{/foreach}

{repeat string="</li></ul>" times=$node->depth-1}</li>
{/if}

Re: help with menu settings

Posted: Tue Oct 22, 2019 3:12 pm
by DIGI3
You're asking how to edit the menu, but you have the template there so you obviously have found out how. You just make your changes then apply/submit.

To call it from your page template you use {menu template='yourtemplatename'}

And, of course, I should mention that you're using an incredibly outdated system with known security vulnerabilities. MenuManager itself is deprecated. Upgrade, and switch to Navigator for your menu templates.