---
title: "get_product_pagination"

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

# get_product_pagination


    获取分类下的商品的分页信息。需配合 [collection](https://developer.shopline.com/zh-hans-cn/docs/sline/object/collection.md) object 使用。

    



    
`collection | get_product_pagination(pageSize)` 返回一个 [`paginate`](https://developer.shopline.com/zh-hans-cn/docs/sline/object/paginate.md) 对象。
    



    
## 必选参数

        
            - `collection` [`collection`](https://developer.shopline.com/zh-hans-cn/docs/sline/object/collection.md)：目标分类。
        
            - `pageSize` `integer`：每页显示的商品个数。
        
    





    
## 例子

        
            

            分页获取并遍历输出分类下的商品列表。


            

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