{% load pagination_tags %}

{% with object.get_items as items %}

    <div class="items">
        {% autopaginate items 1 %}
        {% for item in items %}
            <div class="item {% if forloop.first %}first{% endif %} {% if forloop.last %}last{% endif %}">
                <img src="{{ item.get_gallery_detail_image_LAYER_url }}" alt="{{ item.title }}" />
                <div class="title">
                    {% if item.description %}
                        {{ item.description }}
                    {% else %}
                         {{ item.title }}
                    {% endif %}
                </div>
            </div>
        {% endfor %}
    </div>
    {% paginate %}

{% endwith %}
