EE site is using Structure and NavEE.
Is there a way without having to do a ton of if segment_1=="this" conditionals for an active class to be set for parent level nav to be 'active' when selecting child level navs for the parents?

Right now I have working with the 'is_selected variable when page is parent level, but for child level, that active class is active.

Hope this makes sense.



1 Answer 1


Check out the selected_class_on_parents parameter: http://booyant.com/navee/getting-started#selected_class_on_parents

That should add a class of selected on all parent items when you visit a child page.


  • I have the selected_class_on_parents parameter in place and also the parents_selected_class with my custom class, but when i am on the parent page, the active class is being added, its showing as 'selected'
    – Tad Ward
    Commented Nov 26, 2012 at 18:43
  • forgot to add, is there a way to make it have the custom class on the parents instead of 'selected'?
    – Tad Ward
    Commented Nov 26, 2012 at 19:01
  • Hey Tad, the parent_selected_class is where you would define what you want the class to be for the parents. If you are ON the parent page, it is going to show the standard selected class of "selected" unless you override that with the selected_class parameter. When you get to a child page, your parent elements should get the class assigned to the parent_selected_class parameter. This allows you to differentiate the two. Commented Nov 26, 2012 at 19:19
  • Can you post your NavEE tag? Commented Nov 26, 2012 at 19:19
  • Got it working after your help; here is my code: {exp:navee:custom nav_title="main-nav" wrap_type="ul" selected_class_on_parents="false" parent_selected_class="here" selected_class="here"} <li><a href="{link}" class="{class}">{text}</a>{kids}</li> {/exp:navee:custom}
    – Tad Ward
    Commented Nov 26, 2012 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.