devopera icon indicating copy to clipboard operation
devopera copied to clipboard

Paging plugin for categories

Open pepelsbey opened this issue 11 years ago • 0 comments
trafficstars

Custom categories pages (not all of them) such as /articles/ and /blog/ should be divided into pages: /category/n/ (based on config variable set) with page.next and page.prev objects available containing page number or nothing for building page navigation in following way:

{% if page.prev or page.next %}
    {% if page.prev %}
        <a href="/{{ page.category }}/{{ page.prev }}/">Previous</a>
    {% endif %}
    {% if page.next %}
        <a href="/{{ page.category }}/{{ page.next }}/">Next</a>
    {% endif %}
{% endif %}

pepelsbey avatar Jan 22 '14 09:01 pepelsbey