{% macro govukTabs(params) %} {#- If an id 'prefix' is not passed, fall back to using the name attribute instead. We need this for error messages and hints as well -#} {% set idPrefix = params.idPrefix if params.idPrefix -%}

{{ params.title | default ("Contents") }}

{% if 'items' in params and params['items'] | length %} {% endif %} {% if 'items' in params and params['items'] | length %} {% for item in params['items'] %} {% if item %} {% set id = item.id if item.id else idPrefix + "-" ~ loop.index %}
{% if item.panel.html %} {{ item.panel.html | safe }} {% elif item.panel.text %}

{{ item.panel.text }}

{% endif %}
{% endif %} {% endfor %} {% endif %}
{% endmacro %}