{% for button in buttons %} {% if button.url %} {{ button.label }} {% elif button.submenu %} {% else %} {% endif %} {% endfor %}