{#
  Copied into Mapbender from FOM v3.0.6.3
  see https://github.com/mapbender/fom/blob/v3.0.6.3/src/FOM/ManagerBundle/Resources/views/Manager/menu.html.twig
#}
<ul class="navLevel1 navigation">
  {% for k, item in menu %}

    <li id="manager-{{ k }}" class="navItem {% if item.active is defined %} activeItem {% endif %}">
      <a class="iconLinkButton" href="{{ path(item.route) }}">{{ item.title|trans }}</a>

    {% if item.subroutes is defined and item.subroutes %}
      <ul class="navLevel2">

        {% for item in item.subroutes %}
          <li class="{% if item.active is defined and item.active %} activeItem {% endif %} navItem">
            <a{% if item.idx is defined %} id="{{ item.idx }}"{% endif %} class="iconLinkButton" href="{{ path(item.route) }}">{{ item.title|trans }}</a>

            {% if item.subroutes is defined and item.subroutes %}
              <ul class="navLevel3">

                {% for item in item.subroutes %}
                  <li class="navItem {% if item.active is defined and item.active %} activeItem {% endif %}">
                    <a class="iconLinkButton" href="{{ path(item.route) }}">{{ item.title|trans }}</a>
                  </li>
                {% endfor %}

              </ul>
            {% endif %}

          </li>

        {% endfor %}
      </ul>
    {% endif %}

    </li>
  {% endfor %}
</ul>