get_product_pagination
Retrieves pagination information for products in a collection. This filter must be used in conjunction with the collection object.
collection | get_product_pagination(pageSize) returns a paginate object.
Required params
-
collectioncollection: The target collection. -
pageSizeinteger: The number of products displayed per page.
Example
Fetch pagination data for a collection and loop through the products.
{{#var paginate = collection | get_product_pagination(10) /}}
{{#for item in paginate.list}}
{{forloop.index}}: {{ item.title }}
{{/for}}
Was this article helpful to you?