---
permalink: /blog/categories/%{paginator.group}/
pagination:
# (required) the 'collection' or 'dataset' that we'd like to go through
collection: posts
# (optional) will default to N; the amount of entries per page
count: 5
# (optional) behaves the same way as the 'where' Twig filter
where: drafts == false
# (optional) behaves the same way as the 'group' Twig filter
group: category
# (optional) self explanatory
sort: date
# (optional) ASC (ascending) or DESC (descending)
order: ASC
---
{% for post in this.paginator.collection %}
{{ post.title }}
{% endfor %}
this.paginator will contain the following:
collection - an array containing the contain batch for the current page
total - the number of pages
group - if collection items are being grouped, the current value
page - the integer of the current page number
prevPage - the integer for the previous page number of NULL if it's the first page
nextPage - the integer for the next page number or NULL if it's the last page
The permalink will automatically append page-X/ for every page starting after 2. Whether or not this can be configured is to be determined.
this.paginator
will contain the following:collection
- an array containing the contain batch for the current pagetotal
- the number of pagesgroup
- if collection items are being grouped, the current valuepage
- the integer of the current page numberprevPage
- the integer for the previous page number ofNULL
if it's the first pagenextPage
- the integer for the next page number orNULL
if it's the last pageThe permalink will automatically append
page-X/
for every page starting after 2. Whether or not this can be configured is to be determined.