1

I am running into an issue with a custom NavEE, and I am hoping there is a simple fix for this that I am overlooking.

I have dynamic "secondary" navigation in the sidebar of this site. I want it to always show the nav items that are two and three levels deep. The nav for this site does not go deeper than three levels. Here is my code:

{exp:navee:custom 
    nav_title="primary"
    wrap_type="ol"
    selected_class="is-current"
    selected_class_on_parents="true"
    parent_selected_class="is-current"
    start_nav_from_parent="true"
    start_nav_from_parent_depth="1"
}
    <li class="nav__item">
        <a href="{link}" class="nav__link icn-arrow-right {class}">{text}</a>
        {if has_kids}<div class="nav nav--tertiary">{kids}</div>{/if}
    </li>
{/exp:navee:custom}

This configuration is working very well form me until I sort the contents of a page by category.

For example, I have a typical page: http://www.example.com/resources/faqs/ that allows users to click a link to sort the entries by categories. Let's say one of the categories is "Overview". The resulting page would be http://www.example.com/resources/faqs/category/overview. On this page, the dynamic navigation in the sidebar disappears, and I am assuming it's because a selected class is not being declared when I click a link to sort by category.

I hope I explained this well enough, and I would appreciate any insight into this issue.

ExpressionEngine v2.5.5
NavEE v2.2.6

1 Answer 1

3

Use NavEE's Regular Expression field for the FAQs menu item. This tells NavEE to match an item as selected based on that rule (using preg_match()), rather than just matching the URL itself.

So in your case you could enter /faqs/.

1
  • Perfect, works exactly how you describe. Thank you!
    – Kelly Cook
    Commented Mar 27, 2013 at 15:09

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.