Whats the point of assigning a single json template to multiple pages?

eballeste1
Excursionist
23 4 17

How do I create dynamic pages based on a JSON template file?

I was bummed to find out that if you reassign a JSON template to a second page, both pages will render the same exact content. I guess the result makes sense after I figured out that all of the settings are being stored in the actual JSON file but I'm missing something here as to what strategy should be used to create dynamic pages based off of a new dynamic json template? I looked through dawn's json template files but they all seem to be set up for single use pages. Let's say I want to set up several landing pages using these blocks, how do they all load this template?

Replies 12 (12)

jam_chan
Shopify Partner
894 23 173

Either you use one template for each dynamic page, or you use metafields to display data for each page. 

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview
eballeste1
Excursionist
23 4 17

For landing pages, ok I can duplicate a template and reassign to the new page but what about product pages? To get dynamic content onto a product json template (im not talking about product specs, im talking about secondary, not so important marketing content that make much more sense as section metadata you can edit through the theme editor like subheadlines and descriptions and not metadata you enter in the actual product edit page), I would have to create individual product templates for every single product??

this doesn't make sense.... it doesn't look to be the promised land I thought this was going to be.

I still feel like I'm missing something here and I can't seem to figure it out.

PaulNewton
Shopify Partner
6275 574 1324

@eballeste1 wrote:

, I would have to create individual product templates for every single product??

this doesn't make sense.... it doesn't look to be the promised land I thought this was going to be.

I still feel like I'm missing something here and I can't seem to figure it out.


Can you explain what you thought it would do or why?

Not merchants fault , shopify's language and concepts used around these features is a lesson in how to make an Information Architecture mess.

 

Previously the homepage with dynamic sections only ever had 1 final design, why would this paradigm change just because the url does.

If you change a template all things using that template get those changes.

Thus if you want unique changes give things a unique template.

 

JSON templates are at the RESOURCE level of a type and give you layout control with drag and drop dynamic sections , aka sections everywhere.

They are not at the individual level even if you assign a resource a template that ONLY it ever uses nothing stops it from being applied to another item.

Specific - One offs - If you want a unique template for each individual object  (a product, a collection,etc) make a unique alternate template for that specific item, or set of items.

General - All - the default - Since templates are for RESOURCES(products, collections, pages) if you change a template it affects all RESOURCES using that template. So just used the default template for most items whose layout should be the same.

 

 

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org


eballeste1
Excursionist
23 4 17

@PaulNewton like I said, I was expecting to be able to use sections everywhere and to be able to edit the content of these sections depending on the context of the resource it was applied to. Having a similar layout is useless if the content of the layout will be exactly the same on all product pages. We have a lot of marketing specific content that would make a lot more sense to be editable via the theme customizer rather than some external source like the product edit page or a 3rd party custom fields app. So in order to make this work I'll have to make an alternate template per product, but then I read there is a limit to how many of these alternate template layouts we can create. i don't know but this doesn't seem sustainable/scalable to me.

nutrisail-llc
Tourist
4 0 2

For products at least, you might want to look more into metafields.  Depending on if you're theme has been updated to use new features in 2.0, it might offer the solution you're looking for.  I completely understand what you're saying.  It's useless to use the theme editor to put product specific marketing content on a product template unless it's only going to be used for that product, thus the only other solution would be to create a template for every single product.  With their new metafields feature, you can actually link components of content sections in a product template to dynamic sources pertaining to whichever product is being viewed with said template.  

We are setting up a store with dietary supplements and are using this for an image of the supplement facts.  We created a custom metafield that accepts images called "supplement facts.".  On our product template, we can add a section or a block in a section that contains an image holder.  We can upload an image (which will use that image on anything that uses that template), or...we have the option to connect the image holder to a metafield, like our supp facts metafield.  Now whichever product a customer is viewing that's using said product template, the image holder will pull the image of the supp facts for that product.  

I'm still learning this new system as well, so I apologize if I misunderstood the issue you were explaining.  But if I did understand correctly, hopefully this can offer you some new insight.  

eballeste1
Excursionist
23 4 17

@nutrisail-llc gotchthanks, I sort of get the overall gist of what you're saying.

we use the ACF custom fields app to do basically everything product related with over 108 custom fields which is why we thought that through sections everywhere, we would remove our need for this 3rd party app. 😞 welpScreen Shot 2021-09-23 at 8.58.18 PM.png

eballeste1
Excursionist
23 4 17

Shopify please, using a third party app to manage metadata that will only be used in a single page/resource does not make sense. Sections and section settings make ALL the sense in the world especially when it's editable via your Theme Customizer UI. It's easy to figure out, the fields only show up if you add a specific section. Content editors get immediate feedback. Easy. 

If you look at my screenshot above, we need all of those fields just for product pages, but not all product pages need or use all of those fields. This is super hard to maintain and it's hard to figure out which fields our editors are working with because there is no context. I don't know maybe it's a limitation of the app I'm using and maybe there is an app that has a better interface that filter fields by context of the resource that uses them but it would be so much better if I could do this all from your theme editor! We get a little taste of the good life but then we hit all these weird limitations. 

Is there something planned for this or is this all just wishful thinking?

dbw
New Member
7 0 0

I think this is the same issue I am having. I have reached out to support a few times and spent a few hours on this. I have different collections and for those collection I would like to have different headers/photos/videos. It seems like they are all linked together expect the collection display part. I cannot figure this out at all and there doesn't seem like there is a solution. I can't believe how you can't edit different collection pages differently. This doesn't make sense to me or maybe it's user error ( me)?

PaulNewton
Shopify Partner
6275 574 1324

@dbw wrote:

I have different collections and for those collection I would like to have different headers/photos/videos. 


Make an alternate JSON template that has an alternate design https://shopify.dev/themes/architecture/templates#alternate-templates 

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org


dbw
New Member
7 0 0

Thank Paul, I've created different themes but it looks like you have to assign them to collections? I have tried to do this as well. 

PaulNewton
Shopify Partner
6275 574 1324

@dbw wrote:

Thank Paul, I've created different themes but it looks like you have to assign them to collections? I have tried to do this as well. 


NOT different themes, different TEMPLATES , there is an important difference.

You can only assign alternate templates in the Live published theme. You cannot assign and alternate templates from unpublished themes, 

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org


dbw
New Member
7 0 0

actually, my other question is. I don't see the new templates I've created to assign them to the collection. Screen Shot 2021-09-05 at 2.58.34 PM.png