vartheme_bs5-2.0.x-dev/src/components/organisms/block/htmlBlock/htmlBlock.twig
src/components/organisms/block/htmlBlock/htmlBlock.twig
{#
/**
* @file
* Template for a Block component.
*
* Available config:
* - html_tag: The HTML tag for the block.
* - utility_classes: An array of utility classes.
*/
#}
{% set bundle = bundle ? 'block--' ~ bundle|clean_class : "" %}
{% set id = id ? 'block--' ~ id|replace({"_": "-"})|clean_class : "" %}
{% set tag = tag ? tag : 'div' %}
{% set classes = [
'block',
'block-html-code',
bundle,
id
] %}
<{{ tag }} {{ attributes.addClass(classes) }}>
{% if title_prefix %}
{{ title_prefix }}
{% endif %}
{% if label %}
{% block label %}
{% embed "@atoms/heading/heading.twig" with {
attributes: title_attributes,
content: label,
tag: 'h2'
} %}
{% endembed %}
{% endblock %}
{% endif %}
{% if title_suffix %}
{{ title_suffix }}
{% endif %}
{% block body %}
{{ body }}
{% endblock %}
</{{ tag }}>
