{% if NAVBAR_ITEMS is defined and NAVBAR_ITEMS|length > 0 %} {% for link in NAVBAR_ITEMS %} {% if link.links is defined and link.links|length > 0 %} {% endif %} {% endfor %} {% endif %}