How to create multiple pages of nested collections in Out of the Sandbox themes on Shopify

Out of the Sandbox designs and builds some of the most beautiful themes in the Shopify Theme Store.

On their support site, they document how to set up nested collection pages (which is natively supported in later versions of their themes).

The way they have implemented it requires you to hardcode the handle of the linklist containing your collections. This means you can only use this template once. And it’s not very flexible.

With the following tiny tweak, you will be able to use this for as many nested collection pages as you require.

Replace this line:

{% assign linklist = linklists["linklist-handle"] %}

With this:

{% assign linklist_handle = page.handle | append: "-collections" %}
{% assign linklist = linklists[linklist_handle] %}

Now simply make sure your linklist has a handle in the format {page-handle}-collections and you can have as many nested collection pages as you need.

Leave a comment

Please note, comments must be approved before they are published