[Solved ]Problems with sub menu

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
tcorreia

[Solved ]Problems with sub menu

Post by tcorreia »

Hi all.

I'm using Cms for the first time, and i'm having problems with a sub navigation menu.

I'm using  4 separated templates (all of them have childrens) :

1- Home
   1.1- Careers
   1.2- Contacts
2- Solutions
   2.1-  System Implementation
   2.2-etc
   2.3-etc
   2.4-etc
   2.5-etc
   2.6- Download Information etc 
3- Customers
  3.1-etc
  3.2- etc
4- About

But on Solutions, the link on 2.6 should have a new header and i can't find a way to put it there. Besides that on the home page the sub menu header should be Information and not the name of the page, and the way i make the sub-menu using a template, all sub menu headers are the name of the pages, and i need to be able to change the headers to be like te link on the begining.

So the code it's this :

For the sub menu template:

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.
#siteLeftMenu h2 - To style section header
#siteLeftMenu li - To style the ruler for the separator *} 

{if $count > 0}
<ul>
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>"}
{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"><h2><dfn>Current page is {$node->hierarchy}: </dfn>{$node->menutext}</h2>

{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}
In the page template it's :

Code: Select all

 <div id="siteLeftMenu">
                    {menu template='sub_menu' start_page="home"}
	    </div>
If i just put the {menu template='sub_menu'}  all pages were listed on the sub menu , but with start_page he just show me the childrens of home, and that's what i want. But on Solutions page i need to add a new header after the page 2.5.


Any solutions ?

Thanks in advance
Attachments
solutions.png
Last edited by tcorreia on Wed Sep 17, 2008 4:53 pm, edited 1 time in total.
KO
Power Poster
Power Poster
Posts: 562
Joined: Mon Nov 06, 2006 7:55 pm

Re: Problems with sub menu

Post by KO »

Have you tried "section header" instead of "content"?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Problems with sub menu

Post by Dr.CSS »

You can do something with a {content block="namefortopofmenu" oneline="true"} then in your page you can add the word you want there above the menu in each page...
Locked

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