diff --git a/templates/content/field--node--body--oe-sc-event.html.twig b/templates/content/field--node--body--oe-sc-event.html.twig index 71643d71882c5884589414ad20d85b2644b05c85..463385ac1571d4e6915a530f452a5372e714e642 100644 --- a/templates/content/field--node--body--oe-sc-event.html.twig +++ b/templates/content/field--node--body--oe-sc-event.html.twig @@ -10,14 +10,6 @@ label_display == 'inline' ? 'd-flex', ] %} -{% - set title_classes = [ - 'field__label', - 'fw-bold', - label_display == 'visually_hidden' ? 'visually-hidden', -] -%} - {% if label_hidden %} {% if multiple %} <div{{ attributes.addClass(classes) }}> @@ -32,9 +24,20 @@ {% endif %} {% else %} <div{{ attributes.addClass(classes) }}> - <h3{{ title_attributes.addClass(title_classes) }}> - {{ label }}{% if label_display == 'inline' %}<span class="me-1">:</span>{% endif %} - </h3> + {%- set _label -%} + {{- label -}} + {%- if label_display == 'inline' -%} + <span class="me-1">:</span> + {%- endif -%} + {%- endset -%} + {% include '@oe-bcl/bcl-heading/heading.html.twig' with { + title: _label, + title_tag: 'h3', + attributes: create_attribute().addClass([ + 'field__label', + label_display == 'visually_hidden' ? 'visually-hidden', + ]) + } only %} {% if multiple %} <div class="field__items"> {% endif %} diff --git a/templates/content/field--node--oe-documents--oe-sc-event.html.twig b/templates/content/field--node--oe-documents--oe-sc-event.html.twig index 71643d71882c5884589414ad20d85b2644b05c85..463385ac1571d4e6915a530f452a5372e714e642 100644 --- a/templates/content/field--node--oe-documents--oe-sc-event.html.twig +++ b/templates/content/field--node--oe-documents--oe-sc-event.html.twig @@ -10,14 +10,6 @@ label_display == 'inline' ? 'd-flex', ] %} -{% - set title_classes = [ - 'field__label', - 'fw-bold', - label_display == 'visually_hidden' ? 'visually-hidden', -] -%} - {% if label_hidden %} {% if multiple %} <div{{ attributes.addClass(classes) }}> @@ -32,9 +24,20 @@ {% endif %} {% else %} <div{{ attributes.addClass(classes) }}> - <h3{{ title_attributes.addClass(title_classes) }}> - {{ label }}{% if label_display == 'inline' %}<span class="me-1">:</span>{% endif %} - </h3> + {%- set _label -%} + {{- label -}} + {%- if label_display == 'inline' -%} + <span class="me-1">:</span> + {%- endif -%} + {%- endset -%} + {% include '@oe-bcl/bcl-heading/heading.html.twig' with { + title: _label, + title_tag: 'h3', + attributes: create_attribute().addClass([ + 'field__label', + label_display == 'visually_hidden' ? 'visually-hidden', + ]) + } only %} {% if multiple %} <div class="field__items"> {% endif %}