{% sw_extends '@Storefront/storefront/element/cms-element-vimeo-video.html.twig' %} {% block element_vimeo_video %} {% set config = element.config %} {% set elementData = element.data %} {% set videoUrl = 'https://player.vimeo.com/video/' %} {% set videoUrl = videoUrl ~ config.videoID.value ~ '?' %} {% if config.autoplay.value == true %} {% set videoUrl = videoUrl ~ 'autoplay=true' ~ '&' %} {% endif %} {% if config.byLine.value == false %} {% set videoUrl = videoUrl ~ 'byline=false' ~ '&' %} {% endif %} {% set videoUrl = videoUrl ~ 'color=' ~ config.color.value|replace({'#': ''}) ~ '&' %} {% set videoUrl = videoUrl ~ 'dnt=' ~ config.doNotTrack.value ~ '&' %} {% set videoUrl = videoUrl ~ 'loop=' ~ config.loop.value ~ '&' %} {% if config.title.value == false %} {% set videoUrl = videoUrl ~ 'title=false' ~ '&' %} {% endif %} {% if config.portrait.value == false %} {% set videoUrl = videoUrl ~ 'portrait=false' ~ '&' %} {% endif %} {% if config.controls.value == false %} {% set videoUrl = videoUrl ~ 'controls=false' ~ '&' %} {% endif %}
{% block element_vimeo_video_inner %} {% set iframeClass = 'cms-element-vimeo-video__video' %} {% if config.needsConfirmation.value == false %} {% else %} {% set pluginConfiguration = { videoUrl: videoUrl, iframeClasses: [ iframeClass ], btnClasses: [ 'btn', 'btn-outline-secondary' ], backdropClasses: [ 'cms-element-vimeo-video__backdrop' ], confirmButtonText: 'component.cms.vimeo.acceptButtonLabel'|trans, overlayText: 'component.cms.vimeo.privacyNotice'|trans({ '%url%': path('frontend.cms.page',{ id: shopware.config.core.basicInformation.privacyPage }), '%platform%': 'Vimeo' })|raw } %} {% block element_vimeo_video_placeholder %}
{% if elementData.media %} {% sw_thumbnails 'cms-element-vimeo-video__placeholder' with { media: elementData.media } %} {% endif %}
{% endblock %} {% endif %} {% endblock %}
{% endblock %}