part
The pagination part within navigation can be used to construct navigation elements.
Properties
Returns true if the part is a link. Returns false if not.
The page number associated with the part.
The URL of the part.
It consists of the current page URL path with the pagination parameter for the current part appended.
Example
Create pagination navigation with part
You can create a pagination navigation by iterating over each part object of a paginate object.
{{#var paginate = all_products | get_product_pagination(10) /}}
{{#for part in paginate.parts}}
{{#if part.is_link }}
{{#link_to part.url}}
{{part.title}}
{{/link_to}}
{{#else/}}
<span>{{part.title}}</span>
{{/if}}
{{/for}}
Was this article helpful to you?