dsfr4drupal-1.x-dev/templates/base/base-field-single-value.html.twig
templates/base/base-field-single-value.html.twig
{% if not label_hidden -%}
{%- if attributes is not empty -%}
<div{{ attributes }}>
{%- endif -%}
{% set title_classes = [
label_display == 'visually_hidden' ? 'visually-hidden',
] %}
<div{{ title_attributes.addClass(title_classes) }}>{{ label }}</div>
{%- endif -%}
{% for item in items %}
{% block item_content %}
{%- if label_hidden -%}
{%- if attributes is not empty -%}
<div{{ attributes }}>
{%- endif -%}
{%- elseif item.attributes is not empty -%}
<div{{ item.attributes }}>
{%- endif -%}
{{ item.content }}
{%- if (label_hidden and attributes is not empty) or (not label_hidden and item.attributes is not empty) -%}
</div>
{%- endif -%}
{% endblock item_content %}
{% endfor %}
{%- if not label_hidden and attributes is not empty -%}
</div>
{%- endif -%}
