---
url: https://developer.youcan.shop/themes/tags/paginate.md
---
# Paginate
Splits a list into pages.
These lists can be paginated:
* [`collection.products`](../objects/category.md), for any collection, including `collections['all'].products`
* [`collections`](../objects/collections.md)
* [`search.results`](../objects/search.md)
* [`customer.orders`](../objects/customer.md)
Inside the tag, the list holds the current page only, and the [paginate object](../objects/paginate) describes the pages.
```liquid
{% paginate list by page_size %}
{% for item in list %}
forloop_content
{% endfor %}
{% endpaginate %}
```
* `list`: the list to paginate, for example `collection.products`.
* `page_size`: the number of items per page, from 1 to 250. A number or a variable.
The page comes from the `page` query parameter, for example `/collections/shoes?page=2`.
## Examples
### Products of a collection
```liquid
{% paginate collection.products by 24 %}
{% for product in collection.products %}
{% render 'product-card', product: product %}
{% endfor %}
{% for part in paginate.parts %}
{% if part.is_link %}
{{ part.title }}
{% else %}
{{ part.title }}
{% endif %}
{% endfor %}
{% endpaginate %}
```
### Every product
```liquid
{% paginate collections['all'].products by 24 %}
{% for product in collections['all'].products %}
{% render 'product-card', product: product %}
{% endfor %}
{% endpaginate %}
```
### Collections
```liquid
{% paginate collections by 12 %}
{% for collection in collections %}
{{ collection.title }}
{% endfor %}
{% endpaginate %}
```
## Deprecated form
The older form names a fixed list and an id, and exposes the page through `items`:
```liquid
{% paginate collection.products by 24 cod, category_id: category.id %}
{% for product in items %}
forloop_content
{% endfor %}
{% endpaginate %}
```
It still works, but new themes should use the form above. For search, use `search.results`. The older form also sets the [paginate object](../objects/paginate). Its page parameter is `page[]`, for example `page[cod]`. Its other variables are listed on the same page.