Page 1 of 1

[SOLVED] Removing header links from menu simple_navigation.tpl

Posted: Mon Nov 19, 2007 1:32 pm
by Naglfar
Hello.

I use simple_navigation.tpl menu, it looks like that:

Code: Select all

TOPIC 1
   article 1
   article 2
   arcicle 3

TOPIC 2
   article 1
   article 2
   arcicle 3

TOPIC 3
   article 1
   article 2
   arcicle 3
Here is code of menu:

Code: Select all

{* CSS classes used in this template:
.activeparent - The top level parent when a child is the active/current page
li.active0n h3 - n is the depth/level of the node. To style the active page for each level separately. The active page is not clickable.
.clearfix - Used for the unclickable h3 to use the entire width of the li, just like the anchors. See the Tools stylesheet in the default CMSMS installation.
li.sectionheader h3 - To style section header
li.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}
<li class="currentpage"><h3><dfn>Current page is {$node->hierarchy}: </dfn>{$node->menutext}</h3>

{elseif $node->parent == true}
<li class="activeparent"><a class="activeparent" href="{$node->url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}><dfn>{$node->hierarchy}: </dfn>{$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->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}><dfn>{$node->hierarchy}: </dfn>{$node->menutext}</a>

{/if}

{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}
I want to remove links from "TOPIC 1", "TOPIC 2", "TOPIC 3". How to do it?

Re: Removing some links from simple_navigation.tpl

Posted: Mon Nov 19, 2007 5:33 pm
by Nullig
Change the content type to "sectionheader" for "TOPIC 1", "TOPIC 2" and "TOPIC 3".

Nullig

Re: Removing some links from simple_navigation.tpl

Posted: Mon Nov 19, 2007 11:51 pm
by Naglfar
Thanks, I did that, but now menu seems a little buggy. And there is a link to sectionheader we are currentyly in. See screens below.

Before:
Image

After:
Image

Re: Removing some links from simple_navigation.tpl

Posted: Tue Nov 20, 2007 9:02 am
by Dr.CSS
You need to change the default sectionheader call in the menu CSS to the style you desire...

Re: Removing some links from simple_navigation.tpl

Posted: Tue Nov 20, 2007 10:31 pm
by Nullig
if you post a link to your site, perhaps we could more easily help you.

Nullig

Re: Removing some links from simple_navigation.tpl

Posted: Wed Nov 21, 2007 11:23 am
by Naglfar
Right, thanks. After editing class div#menu_vert li.sectionheader menu looks okay.

This is default theme, so I think, section headers should look all right without modifications.