Reputation: 11
I have more than 100 collections in Shopify. How can I make a pagination or infinite scroll to show this list? Not a list of products in collection, but a list of all collections.
Upvotes: 1
Views: 4392
Reputation: 1083
You should use AJAX to load them, Shopify has limitations of 50 products/collections per page, so you have to load the rest via ajax using some infinite scroll.
Use code for infinite scroll for products and modify it to make it work with collections, I don't think it will be difficult.
Upvotes: 2
Reputation: 36
Shopify for loop can output a maximum of 50 results per page. Shopify Pagination
Just like stated above, use {% paginate %}
tag to increase the pagination number.
I believe the maximum pagination you can set is 2000
Upvotes: 0
Reputation: 373
I had this same issue and here's how you paginate the list-collections.liquid template. In this example, 25, can be swapped with another integer or the string limit.
{%- paginate collections by 25 -%}
...
{%- for collection in collections -%}
...
{%- endfor -%}
...
{%- endpaginate -%}
Upvotes: 3