Skip to content
Snippets Groups Projects
Commit b6314fd3 authored by Thomas Frobieter's avatar Thomas Frobieter
Browse files

Fixed paragraph type list template variable list_element.

parent 59210545
No related branches found
No related tags found
No related merge requests found
......@@ -53,19 +53,22 @@
{%
set list_classes = [
'styled-list',
'styled-list--' ~ rendercontent['field_paragraphs_list_type'][0]['#markup']|clean_class,
'styled-list--' ~ paragraph.field_paragraphs_list_type.value|clean_class,
]
%}
{% set list_element = paragraph.field_paragraphs_list_type.value %}
{% if paragraph.field_paragraphs_list_type.value == "ol" %}
{% set list_element = "ol" %}
{% else %}
{% set list_element = "ul" %}
{% endif %}
{% block content %}
<{{ list_element }}{{ list_attributes.addClass(list_classes) }}>
{% for key, item in rendercontent.field_paragraphs_list_text['#items'] %}
<li>
{{ rendercontent.field_paragraphs_list_text[key] }}
{{- rendercontent.field_paragraphs_list_text[key] -}}
</li>
{% endfor %}
</{{ list_element }}>
{% endblock %}
{% endblock content %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment