{% load wagtailcore_tags %} {% load wagtailimages_tags %} {% load waggylabs_filters %} {% if sidebar %} {# rendering in the sidebar #}
{% image value.image original class='img-fluid rounded' %} {% if visual_settings.preview_buttons_icon_location == 'end' %} {{ visual_settings.preview_buttons_text }} {% if visual_settings.preview_buttons_icon|is_icon %} {% endif %} {% else %} {% if visual_settings.preview_buttons_icon|is_icon %} {% endif %} {{ visual_settings.preview_buttons_text }} {% endif %}
{% if value.footer %}
{{ value.footer|markdown:page.pk|safe }}
{% endif %} {% if value.caption %}
{% if page.table_caption_label %}

{{ page.table_caption_label }}

{% endif %} {{ value.caption|markdown:page.pk|safe }}
{% endif %}
{% elif modal %} {# Modals are always renedered on the main page because they are not working well in case of rendering inside sticky sidebar tabs #} {% else %}
{% if value.caption %}
{% if page.table_caption_label %}

{{ page.table_caption_label }}

{% endif %} {{ value.caption|markdown:page.pk|safe }}
{% endif %} {% if not after_cut %} {% image value.image original class='img-fluid rounded' %} {% endif %} {% if value.footer %}
{{ value.footer|markdown:page.pk|safe }}
{% endif %}
{% endif %}