Dependent Sub Menus

I’d like to have a second-level-menu which only changes when I click the corresponding parent element.

could you provide any code ?

thanks

{% for p in pages.children %}

                {% if (p.active or p.activeChild) %}
            
                    {% for c in p.children %}

                        {% if (c.active) %}

                            <a class="active" href="{{ c.url }}">{{ c.title }}</a>

                        {% else %}

                            <a href="{{ c.url }}">{{ c.title }}</a>

                        {% endif %}

                    {% endfor %}

                {% endif %}
             
            {% endfor %}

this is what i figured out so far ! :smiley: it works just perfectly :smiley: i’m so proud i found it out myselt !

well done, next time past your code between three dashes above and below and it will be formatted nicely :slight_smile:

http://polydeon.com/monosnap/All_posts__Forum__Grav_2015-02-28_14-18-05.png