ds-8.x-3.9/templates/ds-field-minimal.html.twig
templates/ds-field-minimal.html.twig
{#
/**
* @file
* Template to provide minimal HTML for the field.
*
* Available variables:
* - element: The field element.
* - label: The label of the field.
* - settings: The settings for the field.
* - items: List of all the field items. Each item contains:
* - attributes: List of HTML attributes for each item.
* - content: The field item's content.
*/
#}
{%
set classes = [
'field',
'field--name-' ~ field_name|clean_class,
'field--label-' ~ label_display,
label_display == 'inline' ? 'clearfix',
]
%}
{%
set title_classes = [
'field__label',
label_display == 'visually_hidden' ? 'visually-hidden',
]
%}
<div{{ attributes.addClass(classes) }}>
{%- if not label_hidden -%}
<div{{ create_attribute({'class': title_classes}) }}>
{{- label }}{% if settings['lb-col'] %}:{% endif -%}
</div>
{%- endif -%}
{%- for item in items -%}
{{ item.content }}
{%- endfor -%}
</div>
