Hi,
I'm using CMSMS 1.5.3 and I'm having real trouble trying to style a second level parent item differently from a top level parent item. I've lookes through all the forums and can't work out if i need to have two separate menu templates or if my menumanager logic is just wrong.
I currently have 3 menu levels something like the following
1
2
..2.2
..2.3
....2.3.1
3
4
The problem i have is when i click on the 3rd level menu item (2.3.1 above) it's parent item (2.3) is then styled the same as the top level parent item (2), it is acquiring the "menuparent menuactive" class . Instead i want level 2.3 to be styled just the same as the other second level items eg 2.2. I can't work out how to prevent all parent items at any level from acquiring the "menuparent menuactive" class.
Below is my menu manager logic.
{if $node->parent == true or ($node->current == true and $node->haschildren == true) and $node->depth current == true and $node->depth == '2'}
current == true and $node->depth == '3'}
type == 'sectionheader'}
{$node->menutext}
{elseif $node->type == 'separator'}
{elseif $node->depth == '1'}
depth == '3'}
<a class="subl1"
{/if}
And here is what i currently have:
http://www.russtechrambles.co.uk/how-cmsms-works/pages-and-navigation/advisory-committee.php
And this is what i'm trying to achieve (ie the Organisatiation and Governance menu item should be styled the same as Aims and Objectoves):
http://www.mcdconsortium.org/about/advisory.php
I hope i've given enough information. If anyone can help at all i would be very grateful.
Thanks
Russell
Styling the Second Level Parent using Menu Manager [SOLVED]
-
homebrewruss
- Forum Members

- Posts: 12
- Joined: Wed Mar 04, 2009 3:18 pm
Styling the Second Level Parent using Menu Manager [SOLVED]
Last edited by homebrewruss on Fri Mar 20, 2009 11:51 am, edited 1 time in total.
-
homebrewruss
- Forum Members

- Posts: 12
- Joined: Wed Mar 04, 2009 3:18 pm
Re: Styling the Second Level Parent using Menu Manager
After much head scratching it seems i've managed to fix it myself with the following code.
{if $node->parent == true and $node->depth == '1'}
current == true and $node->depth == '1'}
current == true and $node->depth == '2'}
current == true and $node->depth == '3'}
type == 'sectionheader'}
{$node->menutext}
{elseif $node->type == 'separator'}
{elseif $node->depth == '1'}
depth == '3'}
<a class="subl1"
{/if}
Not sure if this is the most elegant way of doing it but it works so i'm happy
{if $node->parent == true and $node->depth == '1'}
current == true and $node->depth == '1'}
current == true and $node->depth == '2'}
current == true and $node->depth == '3'}
type == 'sectionheader'}
{$node->menutext}
{elseif $node->type == 'separator'}
{elseif $node->depth == '1'}
depth == '3'}
<a class="subl1"
{/if}
Not sure if this is the most elegant way of doing it but it works so i'm happy
