block_generation-8.x-1.x-dev/templates/field--block-generation--title.html.twig
templates/field--block-generation--title.html.twig
{#
/**
* @file
* Theme override for a field.
*
* @see template_preprocess_field__block_generation()
*/
#}
{%
set classes = [
'field',
'field--name-' ~ field_name|clean_class,
'field--type-' ~ field_type|clean_class,
]
%}
{% set items_attributes = create_attribute() %}
{%
set items_classes = [
'field__items',
settings.wrapper_link.attributes.hasClass('container') or settings.wrapper_link.attributes.hasClass('container-fluid') ? 'row',
]
%}
{# Title wrapper. #}
{% if settings.wrapper_title %}
<{{ settings.wrapper_title.tag }}{{ settings.wrapper_title.attributes }}>
{% endif %}
<div{{ attributes.addClass(classes) }}>
{% if multiple %}<div{{ items_attributes.addClass(items_classes) }}>{% endif %}
{% for item in items %}
<{{ settings.title.tag }}{{ settings.title.attributes.addClass('field__item') }}>{{ item.content }}</{{ settings.title.tag }}>
{% endfor %}
{% if multiple %}</div>{% endif %}
</div>
{% if settings.wrapper_title %}
</{{ settings.wrapper_title.tag }}>
{% endif %}
