--- title: "Liquid filters: default_pagination" description: Generates HTML for a set of links for paginated results. Must be applied to the [`paginate` object](/docs/api/liquid/objects/paginate). api_name: liquid source_url: html: https://shopify.dev/docs/api/liquid/filters/default_pagination md: https://shopify.dev/docs/api/liquid/filters/default_pagination.md --- # default\_​pagination ```oobleck paginate | default_pagination ``` returns [string](https://shopify.dev/docs/api/liquid/basics#string) Generates HTML for a set of links for paginated results. Must be applied to the [`paginate` object](https://shopify.dev/docs/api/liquid/objects/paginate). ##### Code ```liquid {% paginate collection.products by 2 %} {% for product in collection.products %} {{- product.title }} {% endfor %} {{- paginate | default_pagination -}} {% endpaginate %} ``` ##### Data ```json { "collection": { "products": [ { "title": "Draught of Immortality" }, { "title": "Glacier ice" } ], "products_count": 4 } } ``` ##### Output ```html Draught of Immortality Glacier ice 1 2 Next » ``` ### previous ```oobleck paginate | default_pagination: previous: string ``` Specify the text for the previous page link. ##### Code ```liquid {% paginate collection.products by 2 %} {% for product in collection.products %} {{- product.title }} {% endfor %} {{- paginate | default_pagination: previous: 'Previous' -}} {% endpaginate %} ``` ##### Data ```json { "collection": { "products": [ { "title": "Draught of Immortality" }, { "title": "Glacier ice" } ], "products_count": 4 } } ``` ##### Output ```html Draught of Immortality Glacier ice 1 2 Next » ``` ### next ```oobleck paginate | default_pagination: next: string ``` Specify the text for the next page link. ##### Code ```liquid {% paginate collection.products by 2 %} {% for product in collection.products %} {{- product.title }} {% endfor %} {{- paginate | default_pagination: next: 'Next' -}} {% endpaginate %} ``` ##### Data ```json { "collection": { "products": [ { "title": "Draught of Immortality" }, { "title": "Glacier ice" } ], "products_count": 4 } } ``` ##### Output ```html Draught of Immortality Glacier ice 1 2 Next ``` ### anchor ```oobleck paginate | default_pagination: anchor: string ``` Specify the anchor to add to the pagination links. ##### Code ```liquid {% paginate collection.products by 2 %} {% for product in collection.products %} {{- product.title }} {% endfor %} {% endpaginate %} ``` ##### Data ```json { "collection": { "products": [ { "title": "Draught of Immortality" }, { "title": "Glacier ice" } ], "products_count": 4 } } ``` ##### Output ```html Draught of Immortality Glacier ice ```