Skip to content

Default Pagination ​

Last updated View as Markdown

You get the pagination links of a paginate object. Use the previous and next options to change the text of the first and last links. Use the anchor option to add an anchor to every link.

Example ​

liquid
{% paginate collection.products by 12 %}
  {{ paginate | default_pagination: previous: 'Newer', next: 'Older' }}
{% endpaginate %}

Output

html
<span class="prev"><a href="/collections/all?page=1" title="">Newer</a></span> <span class="page"><a href="/collections/all?page=1" title="">1</a></span> <span class="page current">2</span> <span class="page"><a href="/collections/all?page=3" title="">3</a></span> <span class="next"><a href="/collections/all?page=3" title="">Older</a></span>