Template
<ul class="DropdownList{% if class %} {{ class }}{% endif %} js-DropdownList">
{% for item in menu %}
<li class="DropdownList-item">
{% if not item.sub_menu %}
<a class="DropdownList-label{% if labelClass %} {{ labelClass }}{% endif %}{% if tracking_class %} {{ tracking_class }}{% endif %}" href="{{ item.url }}">{{ item.label }}</a>
{% else %}
<button class="DropdownList-label js-DropdownList-label" type="button">
{{ item.label }}
{% include "@elements/icon/icon.html.twig" with {
name: "chevron",
class: "DropdownList-icon"
} only %}
</button>
{% set overview_link = {
copy: item.copy,
label: item.label,
url: item.url,
} %}
{% include "@template-components/header/main-navigation/dropdown-submenu/dropdown-submenu.html.twig" with {
overview_link: overview_link,
menu: item.sub_menu,
class: "DropdownList-submenu",
backButtonClass: "js-DropdownList-back",
tracking_class: tracking_class
} only %}
{% endif %}
</li>
{% endfor %}
</ul>