{% if editmode %}
{{ include('includes/backend-kopf.html.twig') }}
{% set tabContentArray = {1: 'Optional', 2: 'Bildzuweisung'} %}
{% set tab = 1 %}
<div id="content">
{% if tabContentArray is defined and tab in tabContentArray|keys %}
{{ admin_tabs(tab, tabContentArray) | raw }}
<section class="tabContent">
<p class="hl">Optionale Einstellung:</p>
{% set element = 'artikel' %}
<div id="{{ element }} ">
{{ pimcore_multiselect(element, {
'width': 200,
'height': 100,
'store': [
['abstand-top', 'Abstand nach oben'],
['abstand-bottom', 'Abstand nach unten']
]
}) }}
</div>
</section>
{% endif %}
{% if tabContentArray is defined and 2 in tabContentArray|keys %}
{{ admin_tabs(2, tabContentArray) | raw }}
<section class="tabContent">
<p class="hl">Bild: Breite 2400 x Höhe variabel (Pixel)</p>
<div class="dragdrop"><span class="parentbox">
{{ pimcore_image("bildmodul", {
"title" : "Bild hier hereinziehen",
"width": 200,
"height": 130,
"hidetext": true,
"thumbnail": "img-default-edm"
}) }}</span></div>
</section>
{% endif %}
</div>
{{ include('includes/backend-fuss.html.twig') }}
{% else %}
{% set abstand_top_class = (checkMultiselect(pimcore_multiselect("artikel"),'abstand-top') == true)? ' abstand-top' : '' %}
{% set abstand_bottom_class = (checkMultiselect(pimcore_multiselect("artikel"),'abstand-bottom') == true)? ' abstand-bottom' : '' %}
{% set abstandClasses = abstand_top_class ~ abstand_bottom_class %}
{% set image_path = pimcore_image("bildmodul").getSrc() %}
<div class="{{ abstandClasses }}">
{% set lang = app.request.getLocale() %}
{% if image_path is not empty %}
{{ imageResponsive({"src": image_path,
"ausgabeformat": "img",
"class": "",
"language": lang }) | raw }}
{% endif %}
</div>
{% endif %}