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?
Menu issues
Re: Menu issues
What does your {menu} call for the sidebar menu look like? Which parameters did you use there?
Re: Menu issues
It's this:
<b>{menu_text}</b>
{menu start_level="2" number_of_levels='3' collapse="1"}
Thanks.
<b>{menu_text}</b>
{menu start_level="2" number_of_levels='3' collapse="1"}
Thanks.
Re: Menu issues
Do the subpages use another page-template? What does the {menu} call looks like there?
Re: Menu issues
No they all use the same page template. The call is in the template file.
x
x
Re: Menu issues
ahh now I see... It's the {menu_text} tag. It looks like that one always shows the title of the current page.
Re: Menu issues
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?
Re: Menu issues
Install CGSimpleSmarty and it has examples of how to pull root parent page text...