tip: how to avoid section header appearing as a link when it is a parent...

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
klio
Forum Members
Forum Members
Posts: 25
Joined: Wed Aug 15, 2007 7:20 pm

tip: how to avoid section header appearing as a link when it is a parent...

Post by klio »

with thanks for my friend Aldo for help

this is an old style simple_navigation menu tpl..
i used this one because i could not get the new one to work for me,
however this still had the problem that when the current page is the child of a section header this would appear as a link which would send you back to index.
in red the way to avoid this... we inserted a check on the content type :-)

clem/klio

{if $count > 0}

{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}

{elseif $node->index > 0}
{/if}

{if $node->current == true}
{$node->menutext}

{elseif $node->parent == true}
{if $node->type != 'sectionheader'}
url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}>{$node->menutext}
{else}
{$node->menutext}
{/if}


{elseif $node->type == 'sectionheader'}
{$node->menutext}

{elseif $node->type == 'separator'}


{else}
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}

{/if}

{/foreach}
{repeat string="" times=$node->depth-1}

{/if}
Post Reply

Return to “Layout and Design (CSS & HTML)”