{% for tabId, tab in tabs|filter %} {% set tabIsSelected = ((selectedTab is not defined and loop.first) or (selectedTab is defined and selectedTab == tabId)) -%} {% set class = tab.class ?? '' -%}
  • {{ tag('a', { id: "tab-#{tabId}", class: ['tab', tabIsSelected ? 'sel', class]|filter, href: tab.url, title: tab.label, html: tab.label|e ~ (class == 'error' ? ' '), }) }}
  • {% endfor %}