Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
[Résolu] Tentative de reproduction de menu
#6
Bonjour,
Je pense que ça devrait être correct.
Code :
[== Indéfini ==]
{strip}
{if $count > 0}
<ul class="nav navbar-nav navbar-right">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<div class='submenu-wrapper submenu-wrapper-topbottom'><div class='submenu-inner submenu-inner-topbottom'><ul class='level{$node->prevdepth} dropdown-menu'>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul></div></div>" times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}
{if (($node->parent == true || $node->current == true) && $node->depth == 1 && $node->type != 'sectionheader' && $node->type != 'separator')}
<li class="active dropdown"><a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext} <b class="caret"></b></a>
{elseif $node->type == 'sectionheader'}
<li class="sectionheader">{$node->menutext}
{elseif $node->type == 'separator'}
<li style="list-style-type: none;"> <hr class="separator" />
{elseif $node->depth == 1}
<li class="dropdown"><a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext} <b class="caret"></b></a>
{else}
<li><a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext} </a>
{/if}
{/foreach}
{repeat string="</li></ul></div></div>" times=$node->depth-1}</li></ul>
{/if}
{/strip}


Messages dans ce sujet

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)