{% extends "aldryn_gallery/plugins/gallery.html" %}
{% load cms_tags shuffle %}

{% block gallery %}
<div class="wrapper">
    <p class="trigger-previous"><a href="#previous">previous</a></p>
    <ul class="viewport">
        {% if instance.shuffle %}
            {% for plugin in instance.child_plugin_instances|shuffle %}
                {% render_plugin plugin %}
            {% endfor %}
        {% else %}
            {% for plugin in instance.child_plugin_instances %}
                {% render_plugin plugin %}
            {% endfor %}
        {% endif %}
    </ul>
    <p class="trigger-next"><a href="#next">next</a></p>
</div>
<nav>
    {% for plugin in instance.child_plugin_instances %}
    <a href="#">{{ forloop.counter }}</a>
    {% endfor %}
</nav>
{% endblock gallery %}
