get_pagination
Paginates the specified resource object set and returns a paginate object containing pagination metadata and the resource list.
To be used in combination with the following objects:
CAUTION
To ensure store performance and responsiveness, the maximum number of times this filter can be called during a single page rendering process is 50. When multiple calls include identical input parameters, these calls will be deduplicated and counted as one call. Once the call limit is reached, subsequent calls will return nil.
obj | get_pagination(page_size) returns a paginate object.
Required params
-
objall_collections,all_pages: The given object that contains all resource objects of the desired type. -
page_sizeinteger: The number of items per page.
Example
{{#var paginate = all_collections | get_pagination(10) /}}
{{#for collection in paginate.list}}
{{forloop.index}}: {{ collection.title }}
{{/for}}
Was this article helpful to you?