list-collections template renders the collection list page, which lists all the store's collections. This page is located at the
/collections URL of the store.
list-collections template is located in the
templates directory of the theme:
You can include the following in your list-collections template or a section inside of the template:
The collections object
You can access the Liquid
collections object to display the store's collections.
When working with the
list-collections template, you should familiarize yourself with the following:
Change the order of collections
Typically, this template includes the following loop through the collections to output the display, which outputs the collections in alphabetical order:
If you want to change the order, then you can build a menu to host the collections in your desired order, and loop through the menu items. If you use this method, then you should build a setting to allow merchants to select the menu that's used. You can access the menu through the Liquid linklist object, filter the menu items for collections based on the link type, and access the collection information through the link object.
Collection image fallback
You should have a fallback for the case that a collection doesn't have a collection image. For example, you might use the image of the first product within the collection: