[SOLVED] Extend main-nav without losing login?


Whenever I extend the main-nav.html.twig by either creating my own (a simple copy) of the same name and place it into my sprinkle /templates/navigation folder the navigation menu shows up fine except for the Account login link at the right of the navigation bar.

It also disappears when I try simply extending the main_nav block like this …

{% extends ‘@core/navigation/main-nav.html.twig’ %}

{% block main_nav %}

    <a href="{{site.uri.public}}/about">{{translate("TESTPAGE")}}</a>

{{ parent() }}

{% endblock %}

Is there something obvious that would explain this and how I can extend the navigation bar properly? Thanks in advance for insight.


You’ll actually need to extend the version from account :

{% extends ‘@account/navigation/main-nav.html.twig’ %}


Thanks @Malou! That’s exactly what I needed to do!