Files
KantSites/templates/nav.html.twig
T
kantarci 3391fea58b
CMS quality / php (8.2) (push) Canceled after 0s
CMS quality / php (8.4) (push) Canceled after 0s
CMS quality / browser (push) Canceled after 0s
CMS quality / mysql (push) Canceled after 0s
Add visual button presets, jump targets and menu controls
2026-09-14 13:47:49 +02:00

19 lines
1.1 KiB
Twig

{# One level of a resolved menu. Dropdowns use details/summary so submenus work without JavaScript. #}
<ul class="menu-list menu-level-{{ level|default(1) }}">
{% for link in links %}
<li>
{% if link.children is not empty %}
<details class="menu-branch">
<summary>{% include 'nav-label.html.twig' with {link: link} only %}</summary>
<div class="menu-branch-body">
<a href="{{ link.href }}"{% include 'blocks/link-attributes.html.twig' with {newTab: link.newTab|default(false)} only %}{% if link.current %} aria-current="page"{% endif %}>{% include 'nav-label.html.twig' with {link: link} only %}</a>
{% include 'nav.html.twig' with {links: link.children, level: (level|default(1)) + 1} only %}
</div>
</details>
{% else %}
<a href="{{ link.href }}"{% include 'blocks/link-attributes.html.twig' with {newTab: link.newTab|default(false)} only %}{% if link.current %} aria-current="page"{% endif %}>{% include 'nav-label.html.twig' with {link: link} only %}</a>
{% endif %}
</li>
{% endfor %}
</ul>