A space to discuss online store customization, theme development, and Liquid templating.
With the new theme 2.0 functionality, we have sections everywhere which is great. However, for large sites, having to scroll through dozens of section types when using theme editor seems like a real chore. Is there a way of limiting which sections can appear on which pages? As an example maybe the Product page has very specific sections that wouldn't appear anywhere else on the site so therefore, no need to show them in the "Add Section" for Homepage.
Thanks!
Solved! Go to the solution
This is an accepted solution.
checkout this post here: https://www.shopify.com.au/partners/blog/how-to-create-your-first-shopify-theme-section
For your use case, add this code to the schema within your section file, so it can only appear on product pages:
"templates": ["product"],
This is an accepted solution.
checkout this post here: https://www.shopify.com.au/partners/blog/how-to-create-your-first-shopify-theme-section
For your use case, add this code to the schema within your section file, so it can only appear on product pages:
"templates": ["product"],
Yep! This works. I can't believe it's not documented in the actual documentation!