devopera
devopera copied to clipboard
Paging plugin for categories
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 %}