skip to Main Content

It was my understanding from the Shopify 2.0 announcement that finally Shopify were allowing users to add sections to every page and template individually, rather than just the homepage, or individual templates.

However I’m in the middle of building my first theme since 2.0 released, and I’m finding that sections are still specific to templates and not pages. This means if I add a section to the default collection template it appears on every collection using this template. So if I wanted to have different content on each of my collection pages I’d then have to create a separate template for each collection, which I can do, but it isn’t reasonable to ask my client to do this.

I can see that the data for the sections is being added to the template which appears as JSON in the new as of 2.0 .json template files, I can also see this data has unique ID’s:
enter image description here

I’ve also tried adding unique ID’s to wrap the sections, as per the response here: https://community.shopify.com/c/technical-q-a/os-2-0-sections-per-page/m-p/1266709/highlight/false#M62270

I followed the official Shopify documentation to build the section:
https://www.shopify.co.uk/partners/blog/how-to-create-your-first-shopify-theme-section

Is there a way to make sections specific to individual pages? Or do Shopify plan to implement this feature?

2

Answers


  1. Just create a unique template and they will have dynamic sections available "sections everywhere" available on each of those templates.

    If you’re wanting unique data on the same template, you could look at incorporating metafields but the structure/layout would be the same per template.

    Login or Signup to reply.
  2. Templates are the same as pages (they are literally in the same folder), so if you have a single page and create multiple versions out of it, you will end up with multiple references to the same page!

    You should make your collection template very flexible so your client change it via settings and options in the customize. However, if the change is to abrupt, you should make another template collection, that’s the best practice.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search