0

I have the following code.

<nav class="nav nav--secondary">
{exp:navee:custom 
    nav_title="primary"
    parent_selected_class="is-current"
    selected_class="is-current"
    selected_class_on_parents="true"
    start_nav_from_parent="true"
    start_nav_from_parent_depth="2"
    display_all_children_of_selected="true"
    include_single_parent="true"
    wrap_type="ol"
}

    <li class="nav__item">
        <a href="{link}" class="nav__link {class}">
            {text}
            <i class="icn icn--arrow-right" aria-hidden="true"></i>
        </a>
        {if has_kids}<div class="nav nav--tertiary">{kids}</div>{/if}
    </li>

{/exp:navee:custom}

EE v2.5.5
NavEE v2.2.7

The outcome I am aiming for is: display selected nav item and kids of selected nav item. Everything is working great unless the selected nav item has no kids. When that happens, nothing appears. When the selected nav item has kids, the selected nav will show along with the kids. I have this exactly how I want it to behave except I can't get the selected nav to show up when it does not have kids. I would appreciate any input on this matter. Also happy to clarify if needed.

Here are the two pages:
Displaying nav items properly (it has kids)
Not displaying nav at all (it has no kids)

1

What happens when you remove/alter either {start_nav_from_parent="true"} or {start_nav_from_parent_depth="2"}

It's not even adding the on the page without children (just thinking outloud)....

| improve this answer | |
  • When I remove {start_nav_from_parent="true"}, it displays the entire site navigation. Then, when I remove {start_nav_from_parent_depth="2"}, it shows the same thing. – Kelly Cook Jul 15 '13 at 15:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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