Menu issues

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
judeabb
Forum Members
Forum Members
Posts: 26
Joined: Mon Nov 15, 2010 3:07 pm

Menu issues

Post by judeabb »

On the following site, http://raiseyourbanners.org I use the standard menu template for a side menu.
When you go into a sub page, the top line changes to the sub page as well, instead of remaining as the parent page, so it's very confusing. This happens on the About RYB page, for example - if you click on 'A Brief History' the top menu item changes.
I'm guessing the answer lies somewhere in here. Am I right?
{* 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->parent == true or ($node->current == true and $node->haschildren == true)}
<li class="menuactive menuparent"><a class="menuactive menuparent" href="{$node->url}"><span>{$node->menutext}</span></a>

{elseif $node->haschildren == true and $node->type != 'sectionheader' and $node->type != 'separator'}
<li class="parent"><a class="parent" href="{$node->url}"><span>{$node->menutext}</span></a>

{elseif $node->current == true}
<li class="currentpage"><h3><span>{$node->menutext}</span></h3>

{elseif $node->type == 'sectionheader'}
<li class="sectionheader"><span>{$node->menutext}</span>

{elseif $node->type == 'separator'}
<li class="separator" style="list-style-type: none;"> <hr />

{else}
<li><a href="{$node->url}"><span>{$node->menutext}</span></a>

{/if}

{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}

Can anyone help?
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm

Re: Menu issues

Post by Jos »

What does your {menu} call for the sidebar menu look like? Which parameters did you use there?
judeabb
Forum Members
Forum Members
Posts: 26
Joined: Mon Nov 15, 2010 3:07 pm

Re: Menu issues

Post by judeabb »

It's this:
<b>{menu_text}</b>
{menu start_level="2" number_of_levels='3' collapse="1"}

Thanks.
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm

Re: Menu issues

Post by Jos »

Do the subpages use another page-template? What does the {menu} call looks like there?
judeabb
Forum Members
Forum Members
Posts: 26
Joined: Mon Nov 15, 2010 3:07 pm

Re: Menu issues

Post by judeabb »

No they all use the same page template. The call is in the template file.

x
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm

Re: Menu issues

Post by Jos »

ahh now I see... It's the {menu_text} tag. It looks like that one always shows the title of the current page.
judeabb
Forum Members
Forum Members
Posts: 26
Joined: Mon Nov 15, 2010 3:07 pm

Re: Menu issues

Post by judeabb »

So can I modify the menu_text tag? It doesn't look like it. Can I make another tag that does allow me to just use the level 1 heading in the side menu?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu issues

Post by Dr.CSS »

Install CGSimpleSmarty and it has examples of how to pull root parent page text...
Post Reply

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