{% load wagtailcore_tags %} {% load waggylabs_filters %} {% if sidebar %} {# rendering in the sidebar #}
{% if page.table_caption_label %}{{ page.table_caption_label }}{% else %}Table{% endif %}
{% if visual_settings.preview_buttons_icon_location == 'end' %} {% else %} {% 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 %} {% endif %} {% include_block value.bound_blocks.table %} {% if value.footer %} {% endif %}
{% if page.table_caption_label %}

{{ page.table_caption_label }}

{% endif %} {{ value.caption|markdown:page.pk|safe }}
{{ value.footer|markdown:page.pk|safe }}
{% endif %}