{% load static wagtailcore_tags wagtailimages_tags %} {% if pages_with_promo_code %}
{{ page.main_text|richtext }} {% if page.main_button1 or page.main_button2 %} {% if page.main_button1 %}{% firstof page.main_button1 page.main_button1.title %}{% endif %} {% if page.main_button2 %}{% pageurl page.main_button2 %}{% firstof page.main_button2 page.main_button2.title %}{% endif %} {% endif %} {% for page in pages_with_promo_code %} {{ page.url }} {% with page.main_image as main_image %} {% if main_image %}{% image main_image fill-160x100 %} {% else %} {% static 'images/pic02.jpg' %} {{ ost.title }} {% endif %} {% endwith %} {{ page.title }} {{ page.intro }} {{ page.url }} {% endfor %}
{% endif %}