<div class="collection">
  {% for item in menu %}
    {% if item.submenu %}
      <a href="{{ item.url }}" class="collection-header">{{ item.name }}</a>
      {% for menu in item.submenu %}
        <a href="{{ menu.url }}" class="collection-item">{{ menu.name }}</a>
      {% endfor %}
    {% else %}
      <a href="{{ item.url }}" class="collection-item">{{ item.name }}</a>
    {% endif %}
  {% endfor %}
</div>
