16/10/2010, 20:28:23
Je n'ai pas testé, regarde ceci et donne-moi le résultat en html
Code :
{if $count > 0}
<div id="menuwrapper">
<ul id="topnav">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string='<span>' times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string='</span></li>' times=$node->prevdepth-$node->depth}
{elseif $node->index > 0}</li>
{/if}
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
<li class="menuactive menuparent"><a class="menuactive menuparent"
{elseif $node->current == true}<a class="menuactive"
{else}<a {/if}
{if $node->type != 'sectionheader' and $node->type != 'separator'}
href="{$node->url}">{$node->menutext}</a>
{/if}
{/foreach}
{repeat string='</li></ul>' times=$node->depth-1}
</li>
</ul>
<div class="clearb"></div>
</div>
{/if}