[SOLVED] Extend main-nav without losing login?


#1

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 %}

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

{{ parent() }}

{% endblock %}

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


#2

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

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


#3

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