I've currently been editing some of the site and the menu isn't working as I intend(ed). Basically, the menu should behave like the following:
1.) The home item should have a background-image by default (default as in accessing the site, or clicking on home again);
2.) If a child (or child of child) is accessed, the 1st item ("most parent one") should be set as active, and thus, change background-colour to whatever colour;
3.) Home should not be clickable if you're there already.
Here's my site: http://www.webzhopz.eu
Here's my menu code:
Code: Select all
{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 && $node->depth == 1}
<li><a class="active" href="{$node->url}"><span>{$node->menutext}</span></a>
{elseif $page_alias == 'home'}
<li><a class="homeactive" href="{$node->url}"><span>{$node->menutext}</span></a>
{elseif $node->depth == 1}
<li><a href="{$node->url}"><span>{$node->menutext}</span></a>
{elseif $node->current == true && $node->depth != 1}
<li><a href="{$node->url}" {if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}{if $node->target != ''} target="{$node->target}"{/if}><strong>{$node->menutext}</strong></a>
{elseif $node->type == 'sectionheader'}
<li>{$node->menutext}
{else}
<li><a href="{$node->url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}{if $node->target != ''} target="{$node->target}"{/if}>{$node->menutext}</a>
{/if}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}
<br style="clear:left;" />