{% if gallery %} {% for item in gallery.items %} {{ item.html_tag|safe }} {% endfor %} {% endif %}