[SOLVED] convert html menu template in CMSMS

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
giapippo
Forum Members
Forum Members
Posts: 176
Joined: Tue Feb 28, 2012 1:24 pm

[SOLVED] convert html menu template in CMSMS

Post by giapippo »

Hello to all
I'm adapting a template in CMSMS but the menu makes me crazy
Can you help me to insert the correct parameters?
thanks


original nav bar:
------------------------------------------------------------------------------
nav class="navbar-collapse collapse">

<ul class="nav navbar-nav">
<li class="current active dropdown"><a href="index_2.html" >Home <b class="caret"></b></a>
<ul class="level1 dropdown-menu">
<li><a href="index.html">Home Style 1</a></li>
<li><a href="index_2.html">Home Style 2</a></li>
</ul>
</li>
<li><a href="magazine_layout.html">Magazine Layout</a></li>
<li class="dropdown"></li>

<li><a href="faq.html">Faq</a></li>

</ul>
</nav>
--------------------------------------------------------------------------------

menu cmsms clear



{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}
<div id="menuwrapper">
<ul id="primary-nav">
{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='menuactive'}
{if $node->parent == true}
{assign var='classes' value='menuactive menuparent'}
{/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="menuparent"><a class="menuparent"><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="menuparent"><a class="menuparent"
{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>
</div>
{/if}
Last edited by giapippo on Mon Jun 23, 2014 9:52 pm, edited 1 time in total.
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: convert html menu template in CMSMS

Post by staartmees »

Why don't you use a menu that comes with the standard templates and adapt it using the according stylesheet?
psy
Power Poster
Power Poster
Posts: 463
Joined: Sat Jan 22, 2005 11:19 am

Re: convert html menu template in CMSMS

Post by psy »

giapippo
Forum Members
Forum Members
Posts: 176
Joined: Tue Feb 28, 2012 1:24 pm

Re: convert html menu template in CMSMS

Post by giapippo »

you are great !!!
thanks
Locked

Return to “Layout and Design (CSS & HTML)”