Linked Sections Between Templates

Linked Sections Between Templates

Windsormen
Tourist
6 0 1

Hello,

 

I need to have a main section on a given template, and duplicates on other templates. They auto update according to edits on the main section.

 

It would also be good to be able to natively duplicate sections from one template to another, as well.

 

Any push on how to set this up would be great.

 

'good day !

Reply 1 (1)

EcomGraduates
Shopify Partner
840 71 121

 

  • Create a Section: Start by creating a section file (e.g., main-section.liquid) in your sections directory. Design it with all the content you want.

  • Include the Section: Add {% section 'main-section' %} to your templates where you want it to appear. Any changes to the section will automatically update wherever it's included.

  • Duplicate Sections: To duplicate sections to other templates, you can simply copy the section's Liquid file and include it in your other templates similarly.

 


 If this fixed your issue, likes and accepting as a solution are highly appreciated
|  Build an online presence with our custom-built Shopify Theme: EcomifyTheme
|  Check out our reviews: Trustpilot Reviews
|  We are Shopify Partners: EcomGraduates Shopify Partner