{%- macro list(tabs) -%}
    {% import '@pulsar/pulsar/v2/helpers/html.html.twig' as html %}

    <ul class="tabs__list">
    {%- for tab in tabs -%}
      <li class="{% if tab.active is defined and tab.active == tab.id %}is-active{% endif %}{% if tab.hidden is defined and tab.hidden == true %} hide{% endif %}">

        {%
            set options = {
                'label': tab.label,
                'href': '#' ~ tab.id,
                'data-toggle': 'tab'
            }
        %}

        {{
            html.link(options|merge(tab.data|default({})))
        }}

      </li>
    {%- endfor -%}
  </ul>
{%- endmacro -%}


{%- macro content(tabs) -%}
    {% set existingSources = [] %}

    <div class="tabs__content">
    {%- for tab in tabs -%}

        {%- if tab.src is defined and tab.src != null and tab.src not in existingSources -%}
            <div class="tab__pane{% if tab.active is defined and tab.active == tab.id %} is-active{% endif %}" id="{{ tab.id }}"{% if tab.attr is defined and tab.attr != null %} {{ tab.attr|raw }}{% endif %}>
                {{ tab.src|raw }}
            </div>
            {% set existingSources = existingSources|merge([tab.src]) %}
        {%- endif -%}
    {%- endfor -%}
    </div>
    {{ dump(existingSources) }}
{%- endmacro -%}








Create version 2 of tabs helper which prevents duplicate tab sources from creating duplicate tab panes in the markup
Create version 2 of tabs helper which prevents duplicate tab sources from creating duplicate tab panes in the markup
