My code:
Code: Select all
{if $count > 0}
<ul>
{foreach from=$nodelist item=node name=items}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" 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->current == true}
<li><a href="{$node->url}" {if $node->target ne ""}
target="{$node->target}"{/if}id="current" name="current">{$node->menutext}</a>
{elseif $node->parent == true}
<li><a href="{$node->url}" {if $node->target ne ""}
target="{$node->target}"{/if}id="currentAncestor" name="currentAncestor">{$node->menutext}</a>
{elseif $smarty.foreach.items.last}
<li class="last"><a href="{$node->url}" {if $node->target ne ""}
target="{$node->target}"{/if}>{$node->menutext}</a>
{elseif $node->type == 'sectionheader'}
<li class="sectionheader">{$node->menutext}
{elseif $node->type == 'separator'}
<li class="separator" style="list-style-type: none;"> <hr />
{else}
<li><a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a>{/if}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-2}</li>
</ul>
{/if}
Code: Select all
{elseif $smarty.foreach.items.last and $node->current == true}
<li class="last"><a href="{$node->url}" {if $node->target ne ""}
target="{$node->target}"{/if}id="current" name="current">{$node->menutext}</a>