You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
I created the home page with modular page, but the menu with the other pages is not visible.
instead on the rest of the site it's ok.
if I remove a piece of code from modular.html.twing the first page shows the menu correctly. {% block header_navigation %} {% if show_onpage_menu %} <ul class="navigation"> {% for module in page.collection() if module.header.visible is not same as(false) %} {% set current_module = (module.active or module.activeChild) ? 'active' : '' %} <li><a class="{{ current_module }}" href="#{{ module.menu|hyphenize }}">{{ module.menu }}</a></li> {% endfor %} {% for mitem in site.menu %} <li> <a {% if mitem.class %}class="{{ mitem.class }}"{% endif %} href="{{ mitem.url }}"> {% if mitem.icon %}<i class="fa fa-{{ mitem.icon }}"></i>{% endif %} {{ mitem.text }} </a> </li> {% endfor %} </ul> {% else %} {{ parent() }} {% endif %} {% endblock %}
sorry but I don't understand where I'm wrong.
can you help me
The text was updated successfully, but these errors were encountered:
I have met the same problem and already solved it. In the "partials/base.html.twig", original text are:
{% block header_navigation %}
{% include 'partials/navigation.html.twig' %}
{% endblock %}
you should change to
{% include 'partials/navigation.html.twig' %}
{% block header_navigation %}
{% endblock %}
that means just put the {% include 'partials/navigation.html.twig' %} out of the index.
that's because in modular.html.twig the "site.menu" is not defined.
Hello
I created the home page with modular page, but the menu with the other pages is not visible.
instead on the rest of the site it's ok.
if I remove a piece of code from modular.html.twing the first page shows the menu correctly.
{% block header_navigation %}
{% if show_onpage_menu %}
<ul class="navigation">
{% for module in page.collection() if module.header.visible is not same as(false) %}
{% set current_module = (module.active or module.activeChild) ? 'active' : '' %}
<li><a class="{{ current_module }}" href="#{{ module.menu|hyphenize }}">{{ module.menu }}</a></li>
{% endfor %}
{% for mitem in site.menu %}
<li>
<a {% if mitem.class %}class="{{ mitem.class }}"{% endif %} href="{{ mitem.url }}">
{% if mitem.icon %}<i class="fa fa-{{ mitem.icon }}"></i>{% endif %}
{{ mitem.text }}
</a>
</li>
{% endfor %}
</ul>
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}
sorry but I don't understand where I'm wrong.
can you help me
The text was updated successfully, but these errors were encountered: