{% set UID = uniqid() %}
{% set UIDpage = uniqid() %}
{% if editmode %}
<div class="flex-col offset-bottom-single">
<div class="col xs-12 m-6 l-3">
{% if pimcore_select("imageVideoSelector").isEmpty() and editmode %}
{% do pimcore_select("imageVideoSelector").setDataFromResource("image") %}
{% endif %}
<span class="hint">{{ 'Möchten Sie ein Bild oder Video integrieren?' |trans }}</span>
<div class="select-items">
{{ pimcore_select("imageVideoSelector", {
"store": [
["image", "Bild"],
["video", "Video"]
],
"width": 300,
"reload": true
}) }}
</div>
</div>
<div class="col xs-12 m-6 l-3">
{% if pimcore_select("imagePosition").isEmpty() and editmode %}
{% do pimcore_select("imagePosition").setDataFromResource("align-right") %}
{% endif %}
<span class="hint">{{ 'Bitte wählen Sie die Position des Bildes / Videos aus' |trans }}</span>
<div class="select-items">
{{ pimcore_select("imagePosition", {
"store": [
["align-right", "Rechts"],
["align-left", "Links"]
],
"width": 300,
"reload": true
}) }}
</div>
</div>
<div class="col xs-12 m-6 l-3">
<span class="hint">{{ 'Modulname definieren' |trans }}</span>
{{ pimcore_input("modulname") }}
</div>
</div>
{% endif %}
{% set imageVideoSelectorResult = pimcore_select("imageVideoSelector").getData() %}
<div {% if pimcore_input("modulname") is not empty %}id="{{ pimcore_input("modulname").getData() |lowercase }}"{% endif %} class="section">
<div class="flex-col">
<div class="text-image textpic-intext nowrap flex-col {{ pimcore_select("imagePosition").getData() }}">
{% if imageVideoSelectorResult == 'image' %}
<div class="xs-12 m-6 image">
{% if pimcore_image("teaserImageHalf").isEmpty() and editmode %}
<span class="hint">{{ 'Bild festlegen' |trans }}</span>
{% endif %}
{{ pimcore_image("teaserImageHalf", {
"title": "Drag your image here",
"thumbnail": "textImageFullwidth"
}) }}
</div>
{% endif %}
{% if imageVideoSelectorResult == 'video' %}
{% set videoID = 'uid' ~ UID |raw %}
{% set videoIDResult = pimcore_video('video').id %}
<div class="col xs-12 {{ ImageSize }} video">
<div class="iframe-container">
<div id="{{ videoID }}" class="mute-yt-player-stage">
{{ pimcore_video('video', {
"height": 360,
youtube: {
autoplay: '0',
modestbranding: '1',
showinfo: '0',
controls: '1',
rel: '0',
enablejsapi: '1'
}
}) }}
</div>
</div>
</div>
{% endif %}
<div class="col xs-12 m-6 text flex-column box-center ">
{% if pimcore_wysiwyg("TeaserImageWYSIWYG").isEmpty() and editmode %}
<span class="hint">{{ 'Text festlegen' |trans }}</span>
{% endif %}
{{ pimcore_wysiwyg("TeaserImageWYSIWYG", {
"placeholder": 'Text'
}) |trademark }}
</div>
</div>
</div>
</div>