templates/include/menu/menu_header.html.twig line 1

Open in your IDE?
  1. <ul>
        {% for menuItem in menu|sort((a, b) => a.priority <=> b.priority) %}
            {% set isActive = menuItem.page and menuItem.page.lft <= page.lft and page.rgt <= menuItem.page.rgt %}
    
            {% if menuItem.isActive %}
                <li>
                    <a href="{{ menuItem.toUrl() ? menuItem.toUrl() : 'javascript:void(0);' }}"
                       class="{{ isActive ? 'active' }}">{{ menuItem.name }}</a>
                </li>
            {% endif %}
        {% endfor %}
    </ul>