Skip to content

content-element/text.html.twig

content-element/text.html.twig
{% extends "@Contao/content_element/text.html.twig" %}
{#
Adjust how any blocks of parent or used component templates are rendered.
Try typing "block" or "use" to get autocompletion for available options.
Bild und Text werden in ein div.contentwrapper gepackt, um ein flex oder
grid layout darauf anwenden zu können.
#}
{% block content %}
{% if layout != 'below' %}
{% if image %}
<div class="contentwrapper">
{% endif %}
{{ block('text_media') }}
{% endif %}
{# Richtext #}
{% block text %}
{% if layout == 'below' %}
{% if image %}
<div class="contentwrapper">
{% endif %}
{% endif %}
{{ parent() }}
{% if layout != 'below' %}
{% if image %}
</div>
{% endif %}
{% endif %}
{% endblock %}
{% if layout == 'below' %}
{{ block('text_media') }}
{% if image %}
</div>
{% endif %}
{% endif %}
{% endblock %}