[SOLVED] Removing header links from menu simple_navigation.tpl

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"
Locked
Naglfar

[SOLVED] Removing header links from menu simple_navigation.tpl

Post 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?
Last edited by Naglfar on Wed Nov 21, 2007 11:23 am, edited 1 time in total.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Removing some links from simple_navigation.tpl

Post by Nullig »

Change the content type to "sectionheader" for "TOPIC 1", "TOPIC 2" and "TOPIC 3".

Nullig
Naglfar

Re: Removing some links from simple_navigation.tpl

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Removing some links from simple_navigation.tpl

Post by Dr.CSS »

You need to change the default sectionheader call in the menu CSS to the style you desire...
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Removing some links from simple_navigation.tpl

Post by Nullig »

if you post a link to your site, perhaps we could more easily help you.

Nullig
Naglfar

Re: Removing some links from simple_navigation.tpl

Post 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.
Locked

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