Possible to paginate and sort?

Highlighted
Shopify Partner
5 0 1

Can a collection be sorted on another page (other than /collections)? Is it possible to paginate a collection and sort it? Similar to:

 

{% paginate collections['frontpage'].products by 24 sort: created-ascending %}

or {% paginate collections['frontpage'].products by 24 with created-ascending %} etc.

<!--collection code-->

{% endpaginate %}

0 Likes
Highlighted
Shopify Staff
Shopify Staff
154 0 12

I believe you can paginate collections on other pages so it's probably a syntax issue. 

When you are trying to grab the collection you want make sure to not use square brackets. Use collections.page-handle.products and not collections[page-handle]products which is used for variables names.

You can also make additional collection templates and add various text and images to those templates if you are trying to feature a collection on a "Page" page

0 Likes
Highlighted
New Member
2 0 4

@schaeken  you didn't actually answer what @Blaqseal was asking. Can you sort the paginate object? There is no clear documentation about this. Do you know if you can sort the results of the paginate object? Is there some syntax similar to what @Blaqseal has suggested?

0 Likes