{% for key,element in list_slides.items() %} {% if element.type == 'html' %} {% include 'slideshow/html.html' %} {% elif element.type == 'iframe' %} {% include 'slideshow/iframe.html' %} {% elif element.type == 'image' %} {% include 'slideshow/image.html' %} {% elif element.type == 'text' %} {% include 'slideshow/text.html' %} {% elif element.type == 'video' %} {% include 'slideshow/video.html' %} {% elif element.type == 'youtube' %} {% include 'slideshow/youtube.html' %} {% endif%} {% endfor%}