The paginate object
The paginate tag's navigation is built using the attributes of the paginate
object. You can also use the default_pagination filter for a quicker alternative.
The paginate
object has the following attributes:
paginate.current_offset
Anchor link to section titled "paginate.current_offset"Returns the total number of items that are on the pages previous to the current one. For example, if you are paginating by 5 and are on the third page, paginate.current_offset
would return 10
.
paginate.current_page
Anchor link to section titled "paginate.current_page"Returns the number of the current page.
paginate.items
Anchor link to section titled "paginate.items"Returns the total number of items to be paginated. For example, if you are paginating a collection of 120 products, paginate.items
would return 120
.
paginate.parts
Anchor link to section titled "paginate.parts"Returns an array of all parts of the pagination. A part
is a component used to build the navigation for the pagination.
paginate.next
Anchor link to section titled "paginate.next"Returns the part variable for the Next link in the pagination navigation.
paginate.previous
Anchor link to section titled "paginate.previous"Returns the part variable for the Previous link in the pagination navigation.
paginate.page_param
Anchor link to section titled "paginate.page_param"Returns the URL parameter used to paginate the array. The default is page
.
If your code paginates over an array defined in a setting, then a unique key is appended to page
to allow the paginated list to operate independently from other lists on the page. For example, a paginated list defined in a setting might use the key page_a9e329dc
.
The only array setting types that currently supports pagination are product_list
and collection_list
.
paginate.page_size
Anchor link to section titled "paginate.page_size"Returns the number of items displayed per page.
paginate.pages
Anchor link to section titled "paginate.pages"Returns the number of pages created by the pagination tag.