1

I have my navigation in a Structure like here and I want to build a sub-navigation on my Information page containing Specials, Reviews, and About, but I can't figure out how.

{% set active_item = craft.entries.section('navigation').nextSiblingOf(48).first() %}

doesn't give me what I need (and I really don't like handling with id's).

5

There is an nice recipe on the craftcookbook.net site from sprocketeer that explains exactly this.

{% set topEntry = craft.entries.depth(1).slug('information').first() %}
<ul>
    {% nav subEntry in topEntry.getDescendants() %}
        <li>{{ subEntry.title }}
            {% ifchildren %}<ul>{% children %}</ul>{% endifchildren %}
        </li>
    {% endnav %}
</ul>
| improve this answer | |

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.