Bootstrap 3 Menu with Navigator not Showing

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
mr.bacan

Bootstrap 3 Menu with Navigator not Showing

Post by mr.bacan »

Hi, I've been trying to use Bootstrap's 3 menu to work on CMSMS 2.0.1.1 but it's just not showing up nor giving any errors.

I created a template called "Main Menu" using this code

Code: Select all

{if $count > 0}
<ul class="nav navbar-nav navbar-right">
{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->parent == true }

<li class="dropdown"><a class="dropdown-toggle" href="{$node->url}" data-toggle="dropdown">{$node->menutext} <b class="caret"></b></a>
  
{elseif $node->children_exist == true and $node->depth < $number_of_levels and $node->type != 'sectionheader' and $node->type != 'separator'}
<li class="dropdown"><a class="dropdown-toggle" href="{$node->url}" data-toggle="dropdown">{$node->menutext} <b class="caret"></b></a>

{elseif $node->current == true}
<li class="active"><a href="{$node->url}">{$node->menutext}</a>

{elseif $node->type == 'sectionheader'}
<li class="dropdown"><a class="dropdown-toggle" href="{$node->url}" data-toggle="dropdown">{$node->menutext} <b class="caret"></b></a>
  
{elseif $node->type == 'separator'}
<li class="divider-vertical">

{else}
<li><a href="{$node->url}">{$node->menutext}</a>

{/if}

{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}
Using type: Navigator::Navigation and then calling it with {Navigator loadprops='0' template='Main Menu'}. No matter what I do the menu won't show up.

Does anyone has any idea what am I doing wrong?

Thanks in advance.
mr.bacan

Re: Bootstrap 3 Menu with Navigator not Showing

Post by mr.bacan »

Obviously I'm missing several things, but at least I managed to show the menu, the thing is that the submenu is not rendering.

Here's the code I have until now

Code: Select all

{if !isset($depth)}{$depth=0}{/if}
<ul class="nav navbar-nav navbar-right">
{if isset($nodes)}
{strip}
	{foreach $nodes as $node}
			{if $node->children_exist == true}
			<li class="dropdown">
				<a href="{$node->url}" class="dropdown-toggle {$classes}" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{$node->menutext}<span class="caret"></span></a>
			</li>
		{elseif $node->current == true}
			<li>
				<a class="active" href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a>
			</li>
		{else}
			<li>
				<a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a>
			</li>
		{/if}
	{/foreach}
{/strip}
{/if}
</ul>
I'll be very grateful if someone could guide me on the right direction.

Here's a link to the working site http://www.medimexsa.com/webdemo-2015/

Thanks in advance.
Locked

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