07/01/2012, 03:08:51
Code :
{if $node->depth==1 and $node->haschildren == false}<li class="menu{$node->hierarchy}"><a
Donc, dans ton cas particulier, et si tu n'ajoutes pas d'enfants, de sectionheader ou de séparateur, ce code suffira :
Code :
{* CSS classes used in this template:
#menuwrapper - The id for the <div> that the menu is wrapped in. Sets the width, background etc. for the menu.
#primary-nav - The id for the <ul>
.menuactive - The class for each <li> that is active. *}
{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->index > 0}</li>
{/if}
{if $node->current == true}<li class="menuactive menu{$node->hierarchy}"><a
{else}
<li class="menu{$node->hierarchy}"><a
{/if}
href="{$node->url}"><span>{$node->menutext}</span></a>
{/if}
{/foreach}
{repeat string='</li><li class="separator once" style="list-style-type: none;"> </li></ul>' times=$node->depth-1}
</li>
</ul>
<div class="clearb"></div>
</div>
{/if}