adding menu class for first item
Posted: Thu Jul 03, 2008 2:51 pm
So I usually use the grass stains menu as a base for most horizontal menus. It works great. But I would like to add a class for the first item (as to remove the border-left from the far left of the menu).
here is the menu template I have working
Anyone know where to start to add a if item first add the ?
thanks
here is the menu template I have working
Code: Select all
{* CSS classes used in this template:
.active - The active page in the horizontal menu (first level).
.bullet_sectionheader - To style section header
hr.separator - To style the ruler for the separator *}
{if $count > 0}
<ul>
{foreach from=$nodelist item=node}
{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 or $node->parent == true}
<li class="active"><a href="{$node->url}" class="active">{$node->menutext}</a>
{else}
<li><a href="{$node->url}">: {$node->menutext} :</a>{/if}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-2}</li>
</ul>
{/if}
thanks