{% set headlineTag = pimcore_select('headlineTag', {
'store': [
['none', 'none'],
['h1', 'H1'],
['h2', 'H2'],
['h3', 'H3'],
['h4', 'H4'],
['h5', 'H5'],
['h6', 'H6'],
],
'defaultValue': '',
'reload': true
}) %}
{% if headlineTag.isEmpty() %}
{% do headlineTag.setDataFromResource('h2') %}
{% endif %}
{% set headline1 = headlineTag.data != 'none' ? headlineTag.data|raw : 'span'|raw %}
{% set headline2 = headlineTag.data != 'none' ? '</' ~ headlineTag.data|raw ~ '>' : '</span>'|raw %}
{% if editmode %}
<div class="edit-box">
<h1>KONFIGURATIONEN FÜR DEN AREABRICK:</h1>
<div class="flex gap-20">
<div class="content flex column gap-20">
<div class="content-box flex gap-20">
<div class="item">
<p class="edit-p">Abstand nach unten wählen:</p>
{{ pimcore_select("MarginBottom", {
"reload": true,
"store": [
["regular", "Normal"],
["half", "1/2"],
["small", "1/4"],
["zero", "kein Abstand"],
],
"defaultValue" : "regular"
}) }}
</div>
<div class="item">
<p class="edit-p">Titel-Typ definieren:</p>
{{ headlineTag|raw }}
</div>
{#<div class="item">
<p class="edit-p">Anker Text:</p>
{{ pimcore_input('anchor',{'placeholder':'Anker Text','width':300}) }}
</div>#}
</div>
</div>
</div>
</div>
{% endif %}
<section class="benefits {{ pimcore_select('MarginBottom').getData() }}">
<div class="container">
<div class="content-container">
{% if editmode %}
<h2 class="benefits-title">
{{ pimcore_textarea("headline",{
"nl2br": true,
"height": 100,
"placeholder": "Benefit Titel"
}) }}
</h2>
{% elseif not editmode and not pimcore_textarea('headline').isEmpty() %}
<{{headline1|raw}} class="benefits-title">
{{ pimcore_textarea('headline').getData() | nl2br }}
{{headline2|raw}}
{% endif %}
<div class="lauf">
{% if editmode %}
<p>{{ pimcore_textarea("text",{
"nl2br": true,
"height": 100,
"placeholder": "Oconsetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita "
}) }}
</p>
{% elseif not editmode and not pimcore_textarea('text').isEmpty() %}
<p>{{ pimcore_textarea('text').getData() | nl2br }}</p>
{% endif %}
</div>
</div>
{% if editmode %}
{{ pimcore_relations("Teaser", {
"title": "Benefits Objekte ablegen",
"types": ["object"],
"subtypes": {
"object": ["object"]
},
"classes": ["Benefits"]
}) }}
{% elseif not editmode and not pimcore_relations("Teaser").isEmpty() %}
<div class="elements {% if pimcore_relations("Teaser") | length < 4 %}small{% endif %}">
{% for teaser in pimcore_relations("Teaser") %}
<div class="teaser">
<div class="img-container">
{{ teaser.image.thumbnail('BenefitsTeaser').html | raw }}
</div>
<div class="lauf content-elements">
<h3>{{ teaser.headline }}</h3>
<p>{{ teaser.text | nl2br }}</p>
</div>
</div>
{% endfor %}
</div>
{% endif %}
</div>
</section>