Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hey
The title pretty much covers it, I think?
We have a lot of presets, and when people are building out templates inside the theme editor, the list is getting bigger every day so it becomes hard to navigate, and for some presets, we don't want them being able to be added on certain pages.
So, is there any way to apply restrictions to presets?
Cheers
Solved! Go to the solution
This is an accepted solution.
Hi @StevieW,
You can refer https://shopify.dev/themes/architecture/sections/section-schema#templates
You can use templates, it will help you to manage display in templates.
Hope it helps!
Hi @StevieW,
It's not really clear for someone to check.
Are you referring to 'default' in the Schema?
Please describe it more, I will help you check it
I'll attach an image to better show what I mean.
Say I'm inside the theme editor and editing the home page, I can update / edit existing sections & blocks and at the bottom is the '+ Add Section' button. When clicked, it brings up a list of sections that can be added.
I know I can remove the 'preset' part of the section schema to stop them showing here, but I want a little more control. Currently, when you click this button, to my knowledge, every possible section with a preset is shown, but I'd like to curate this list so depending on the template I'm editing, only specific presets show?
We have around 30+ presets currently, and this is increasing quickly, so not only am I trying to keep the list a little more manageable, I'm also trying to avoid people just plonking down a section anywhere they please.
Hope that's a little clearer, and thanks!
This is an accepted solution.
Hi @StevieW,
You can refer https://shopify.dev/themes/architecture/sections/section-schema#templates
You can use templates, it will help you to manage display in templates.
Hope it helps!
Brilliant, thank you!
That allows me to restrict to template types, so all collections, all pages, etc, but what if I want to restrict to a specific template, say 'collection.new-template'?
Hi @StevieW,
As far as I know, it's not possible.
Or you can contact Shopify directly, they will explain the details for you
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025