{% import "nav_item.html" as item with context %} {% if nav|length > 1 %} {% for nav_item in nav %} {% set depth = 1 %} {{ item.render(nav_item, depth, loop.index) }} {% endfor %} {% endif %}