---
title: "get_pagination"

doc_type: static
doc_category: static
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/sline/filter/get-pagination'
  md: 'https://developer.shopline.com/docs/sline/filter/get-pagination.md'
---

# get_pagination


    Paginates the specified resource object set and returns a [paginate](https://developer.shopline.com/docs/sline/object/paginate.md) object containing pagination metadata and the resource list.

    To be used in combination with the following objects:

- [all_collections](https://developer.shopline.com/docs/sline/object/all-collections.md)
- [all_pages](https://developer.shopline.com/docs/sline/object/all-pages.md)

> **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`](https://developer.shopline.com/docs/sline/object/paginate.md) object.
    



    
        ## Required params

        
            - `obj` [`all_collections`](https://developer.shopline.com/docs/sline/object/all-collections.md), [`all_pages`](https://developer.shopline.com/docs/sline/object/all-pages.md)\: The given object that contains all resource objects of the  desired type.
        
            - `page_size` `integer`\: The number of items per page.
        
    





    
## Example

        
            

            

            

            
<SlineExample path={''} objects={ 
    [""] 
}>
```sline
{{#var paginate = all_collections | get_pagination(10) /}}
{{#for collection in paginate.list}}
    {{forloop.index}}: {{ collection.title }}
{{/for}}
```
</SlineExample>
            
        
    
