1KA_F2F/frontend/drupal9/web/modules/contrib/ds/templates/ds-field-minimal.html.twig

32 lines
777 B
Twig
Raw Normal View History

2021-07-27 14:46:32 +02:00
{#
/**
* @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-' ~ element['#field_name']|clean_class,
]
%}
<div{{ attributes.addClass(classes) }}>
{%- if not label_hidden -%}
<div class="field-label-{{ element['#label_display']|clean_class }}">
{{- label }}{% if settings['lb-col'] %}:{% endif -%}
</div>
{%- endif -%}
{%- for item in items -%}
{{ item.content }}
{%- endfor -%}
</div>