{% if video_url is empty %}
    {% set video_url = p.pagedata['Video Banner'][0]['Youtube URL']['value'] %}
{% endif %}

{% if image is empty %}
    {% set image = p.pagedata['Video Banner'][0]['Image'] %}
{% else %}
    {% set image_set_externally = true %}
{% endif %}

{% if image_alt_tag is empty %}

    {% if image['alt'] is empty %}
        {% set image_alt_tag = p.title %}
    {% endif %}

{% endif %}



{% if video_url is not empty %}
    <div class="videoBanner">

        <div class="wrapper">

            <div class="videoWrap">

                <div class="videoBox">
                    <a href="{{ video_url }}" class="js_video_trigger" data-video="true">
                        <div class="imageWrap">
                            <img
                                 src="/{{ image_folders['cms_images']['video_banner']['path'] }}/{{ image['value'] }}"
                                 alt="{{ image_alt_tag }}"
                                 class="imageDesktop"
                                 loading="lazy"
                            />
                            <img
                                src="/{{ image_folders['cms_images']['video_banner_mobile']['path'] }}/{{ image['value'] }}"
                                alt="{{ image_alt_tag }}"
                                class="imageMobile"
                                loading="lazy"
                            />
                        </div> <!-- .imageWrap -->
                    </a>
                </div> <!-- .videoBox -->

            </div> <!-- .videoWrap -->

        </div> <!-- .wrapper -->

    </div> <!-- .videoBanner -->
{% endif %}
