paginate
A set of pagination information, which can be used to build pagination navigation and display data on a page.
Properties
A list of pagination parts, used to build pagination navigation.
A list of data displayed on the current page.
The total number of items displayed on all pages before the current page.
For example, if 5 items are displayed per page and the current page is page 3, the value of paginate.current_offset returns 10.
The page number of the current page.
The total number of items displayed across all pages.
For example, if you paginate a collection of 120 products, the value of paginate.items returns 120.
The URL parameter denoting the pagination.
Default value: page
The number of items displayed per page.
The total number of pages.
The pagination part used to navigate to the previous page.
The pagination part used to navigate to the next page.
Example
The following example uses the get_product_pagination filter to get a set of products from a store. A paginate object is returned.
{{#var paginate = collection | get_product_pagination(5) /}}
{{#for product in paginate.list}}
{{#link_to product.url}}
{{product.title}}
{{/link_to}}
{{/for}}