{% load i18n displaypage_tags media_tags %} {# The media of a text & media section. Context: section, gallery, embed_html; background=True inside "over media" layouts. #} {% if section.media_type == 'video' %} {% if section.video_file %} {% if background %} {% else %}
{% endif %} {% elif embed_html %}
{% dp_embed embed_html %}
{% endif %} {% elif section.media_type == 'gallery' and gallery %} {% if background %}
{% for image in gallery %}{% endfor %}
{% else %} {% endif %} {% elif section.image %} {% if background %} {% media_mobile_source section.image section.mobile_image %} {{ section.image.title }} {% else %} {% media_mobile_source section.image section.mobile_image %} {{ section.image.title|default:section.caption }} {% endif %} {% endif %}