You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
841 B
40 lines
841 B
2 years ago
|
{%
|
||
|
set classes = [
|
||
|
'field',
|
||
|
'accordionjs',
|
||
|
'field--name-' ~ field_name|clean_class,
|
||
|
'field--type-' ~ field_type|clean_class,
|
||
|
'field--label-' ~ label_display,
|
||
|
]
|
||
|
%}
|
||
|
{%
|
||
|
set title_classes = [
|
||
|
'field__label',
|
||
|
label_display == 'visually_hidden' ? 'visually-hidden',
|
||
|
]
|
||
|
%}
|
||
|
|
||
|
{% if label_hidden %}
|
||
|
{% if multiple %}
|
||
|
<ul{{ attributes }}>
|
||
|
{% for item in items %}
|
||
|
{{ item.content }}
|
||
|
{% endfor %}
|
||
|
</ul>
|
||
|
{% else %}
|
||
|
{% for item in items %}
|
||
|
<div{{ attributes.addClass(classes, 'field-item') }}>{{ item.content }}</div>
|
||
|
{% endfor %}
|
||
|
{% endif %}
|
||
|
{% else %}
|
||
|
<ul id="accordion" {{ attributes.addClass(classes) }}>
|
||
|
{% if multiple %}
|
||
|
{% endif %}
|
||
|
{% for item in items %}
|
||
|
{{ item.content }}
|
||
|
{% endfor %}
|
||
|
{% if multiple %}
|
||
|
{% endif %}
|
||
|
</ul>
|
||
|
{% endif %}
|