Hello,
I am trying to follow the tutorial about using nested_pages to get my menu working.
I finally figured out how to get it to fall in line with my css.
Now I am trying to make the menu labels highlight when selected. It works great for submenu's below home, but I can't get home to only be highlighted when ON home. I'm not using Superfish, so I am not sure what the difference is. I have unclicked the box on Home to "Mark as selected" but it didn't do anything, so I am trying the code below, but home is always highlighted:
I also tried: <cms:if k_is_current || (k_is_active && k_level!='0'> class="selected"</cms:if>
But then Home never highlights...any ideas?
I am trying to follow the tutorial about using nested_pages to get my menu working.
I finally figured out how to get it to fall in line with my css.
Now I am trying to make the menu labels highlight when selected. It works great for submenu's below home, but I can't get home to only be highlighted when ON home. I'm not using Superfish, so I am not sure what the difference is. I have unclicked the box on Home to "Mark as selected" but it didn't do anything, so I am trying the code below, but home is always highlighted:
- Code: Select all
<div id="mainMenu">
<ul>
<cms:nested_pages masterpage='index.php'>
<li><a href="<cms:show k_nestedpage_link />" <cms:if k_is_current || k_is_active> class="selected"</cms:if> ><span><cms:show k_nestedpage_title /></span></a>
<cms:if k_level='1' && k_total_children!='0'><ul></cms:if>
<cms:if k_level='1' && k_total_children='0'></li></cms:if>
<cms:if k_last_child='1' && k_level!='1' && k_level!='0'></li></ul></li></cms:if>
</cms:nested_pages>
</ul>
</div>
I also tried: <cms:if k_is_current || (k_is_active && k_level!='0'> class="selected"</cms:if>
But then Home never highlights...any ideas?