How to create different sidebars for different collections while using Gecko theme?

2 0 0


I am using the Gecko theme for my store and I am trying to use different sidebars for different pages that show collections under different categories.

There is a solution provided by OUT OFF THE SANDBOX, which suggests that:


Step 1: Head into your  Shopify Admin > Online Store > Themes > Actions > Edit Code > Templates > Add a new Template.

Step 2: Select 'collection' as the template type, and name it something memorable, like 'alternate' or 'skirts'.

Step 3: Within the new collection.alternate.liquid template, look for this code:

{% section 'collection-template' %}

... and replace it with this code:

{% section 'collection-template-alternate' %}

... where you are calling on an alternate copy of the collection section code.

Step 4: Then, in Edit Code > Sections > Add a new section, and name the section to match the change you made to the alternate collection template (collection-template-alternate in this example).

Step 5: In Edit Code > Sections open the original collection-template.liquid and COPY ALL the code to your clipboard.

Step 6: Next, open your alternate collection section code (collection-template-alternate.liquid), delete all the existing code, and PASTE the code you just copied from the original collection section code.

Step 7: To do this, head into your Shopify Admin > Online Store > Products > Collections. Select the Collection to which you would like to add your unique sidebar. In the bottom right corner of the Collection page, select collection.alternate as the template, and save:


However, my problem is in the Gecko theme, there is no such code as '{% section 'collection-template' %}' to be replaced.


Does anyone know how to fix this problem in the Gecko theme?


Here is the code of the collection.alternate.liquid file from the Gecko theme:






thank you!!!!

Replies 3 (3)

Shopify Partner
2332 350 1031

So usually when you open collection.liquid it leads to a section called collection-template. I'm guessing that when you open your collection.liquid, the code you showed us a screenshot of is the code you see instead of "{% section 'collection-template' %}". You just need to edit the collection.alternate.liquid to your liking and then you can pick it from the collection template dropdown on the backend and your changes will be reflected on that collection. 

If my solution helped you, please like it and accept it as the solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish 😄
2 0 0

so I assigned the collection.alternate.liquid to a new collection.

after that, I went to the theme customization page to add categories into the sidebar, but when I change the content of the sidebar of the collection I assigned collection.alternate.liquid to, the content of sidebar of all other collections are changed as well. That I still have no clue how to fix.


If you know how to solve that, I would really appreciate it!

1 0 0

I'm wondering if you got this resolved? I'm having the same issue. Even with a new template, the sidebar filter changes impact all Collections not just the ones with that template. Any help is appreciated - thanks!