paginate
Splits a large list into pages and exposes the paginate object.
Syntax
{% paginate collection.products by 24 %} … {% endpaginate %}Inside the block, the list only contains the current page. The paginate object exposes current_page, pages, items, previous, next, and parts — or pass it to default_pagination for ready-made controls.
Example
{% paginate blog.articles by 12 %}{{ paginate | default_pagination }}{% endpaginate %}Output:
Prev / page numbers / Next controls.