跳到主要内容

paginate

关于一组 paginate tags 内分页的信息。

PropertiesTypeDescription
current_offsetnumber当前页面之前所有页面的项目总数。
current_pagenumber当前页面的页码。
itemsnumber待分页的项目总数。例如,若您对包含 120 个商品的 collection 进行分页,则 paginate.items 的值为 120。
nextpart跳转至下一页的分页部分。
pahe_sizenumber每页显示的项目数。
pagesnumber总页数。
partsan array of part分页部分,用于构建分页导航。
{
"page_size": 8,
"current_page": 1,
"current_offset": 0,
"pages": 11,
"items": 85,
"next": {
"url": "/collections/all-products?preview_theme_id=&page=2",
"is_link": true
},
"parts": [
{
"is_link": false,
"title": "1",
"url": ""
},
{
"is_link": true,
"title": "2",
"url": "/collections/all-products?preview_theme_id=&page=2"
},
{
"is_link": true,
"title": "3",
"url": "/collections/all-products?preview_theme_id=&page=3"
},
{
"is_link": false,
"title": "...",
"url": ""
}
]
}