0
votes

I tried following this guide to create an alternative template for customization. https://shopify.dev/tutorials/customize-theme-create-alternate-templates

However, every single section edit I makee are global.

For example: I have two page template: pages.alternative1.liquid and pages.alternative2.liquid

Whenever I edit a section on a page with pages.alternative1.liquid, the same edit affects the same section on pages.alternative2.liquid as well. Is this normal behavior from Shopify? How should I edit the page then so that a change in one section doesn't affect all template?

*Note: I am editing the Debut default theme using Shopify editor: Theme => Customize

Best Regards

1

1 Answers

0
votes

Yes this is a normal behavior.

Static sections ( they are the section that are called like so {% section 'your section' %} ) share content between them. This means that if you edit one anywhere it will update everywhere you use it.

On another hand section that are used on the homepage via the {{content_for_index}} tag are dynamic and you can create the same section with different content. (but only on the homepage or where the tag in question is present)

So if you like to have different content on the page a single section will not do you any good. You can create multiply sections with different names in order to use them on different pages, but if you have 5-10+ page it's not a viable option, since it will become too much of a cluster of section files.