Mastering Shopify Themes: Navigating JSON Templates and Section Schemas in Large Stores

Hey everyone! As a Shopify migration expert and someone who spends a lot of time poring over community discussions, I wanted to share some really valuable insights from a recent thread that hit home for many store owners and developers dealing with larger, more complex Shopify themes. The original question from angelina-new-user really sparked some great conversation about managing JSON templates and section schemas, especially when you’re trying to keep things modular and scalable. It’s a common pain point, and the community had some truly golden nuggets of wisdom.

The Modularity Dream: Building Flexible Sections

Right out of the gate, many of us — myself included — are huge fans of building “modular, highly adjustable sections with rich schemas.” As alinacarrie pointed out in the thread, a single, well-designed section can be incredibly versatile. Think about it: using dynamic blocks and adjustable parameters like spacing or grid layouts lets you use that same hero banner or product grid across tons of different pages without duplicating code. This approach is fantastic for preventing “theme bloat” and keeping your codebase clean and maintainable. It’s the ideal scenario for future-proofing your store’s design.

The Reality Check: Where Shopify’s Architecture Bites Back

However, as lumine — another seasoned developer in the thread — wisely cautioned, there are some significant “gotchas” that can turn the modular dream into a nightmare if you’re not careful. The biggest one? Section data isn’t shared across JSON templates.

What does this mean for you? If you use that amazing, flexible hero section on 12 different page templates (say, your homepage, various landing pages, collection pages), Shopify stores 12 independent copies of its settings. Change the schema, and those 12 instances still hold onto their old values. This can lead to unexpected behavior and a lot of manual cleanup if not handled properly.

Treating Sections as “Settings Contracts”

Lumine introduced a brilliant concept here: start treating your sections less as layouts and more as “settings contracts.” Here’s what that entails:

  • Don’t Rename Setting IDs: The merchant’s customizer values are stored under specific setting IDs within the template JSON. If you rename something like heading_size to title_size in your schema, every existing instance of that section will quietly fall back to the schema’s default. The old heading_size value just sits there, orphaned and unused.
  • Don’t Rename Section “Types” (File Names): The same rule applies to the section’s type, which is essentially its file name. If you rename the Liquid file for a section, all existing references to it in your JSON templates will be orphaned, causing those sections to disappear or break.

Actionable Tip: Before committing to an architecture for a large theme, make absolutely sure your setting IDs and section type names are stable and well-thought-out. Renaming them later is a costly headache.

Shopify’s Theme Editor Limits You Need to Know

It’s also crucial to be aware of Shopify’s hard limits when planning your theme:

  • 25 sections per JSON template: This means you can’t just stack an infinite number of sections on a single page.
  • 50 blocks per section: If your sections use dynamic blocks (like multiple text blocks, image blocks, etc.), this budget can get eaten up faster than you’d expect, especially with “deep nesting.”
  • 1000 JSON templates per theme: While this is a high limit, for extremely large stores, it’s something to keep in mind.

These limits reinforce the need for thoughtful design and careful planning, especially when aiming for highly modular sections with many dynamic blocks.

Navigating Upgrades Without Destroying Client Content

This was a big concern for angelina-new-user, and it’s a common developer nightmare: how do you update your theme without wiping out all your client’s carefully customized settings? Lumine shared a critical trap related to presets:

The Presets Trap: Presets only “fire” when someone adds a section from the “Add section” picker in the theme editor. Any sections that were already placed on a page a year ago won’t automatically inherit your new preset values or schema defaults.

Actionable Tip for Upgrades: When you introduce new settings to an existing section’s schema, the default value you provide for that new setting should be “safe.” This means the default should reproduce the current rendered output of existing sections, not necessarily “improve” it. This prevents older instances of your section from suddenly changing their appearance when you push a theme update.

The GitHub Integration “Gotcha”

For those of us who use GitHub for theme development (which is most of us!), there’s another crucial detail. Shopify’s GitHub integration, as lumine pointed out, commits theme editor changes directly back to your connected branch. And, frustratingly, the docs say this behavior can’t be disabled. This means your client’s customizer sessions are actively writing into your Git history!

Actionable Tip for GitHub Users: Be extremely cautious with merge requests (PRs) that touch JSON templates. Lumine suggests keeping template JSON out of PR diffs unless changing it is the explicit point of the PR. Otherwise, a seemingly innocuous merge could silently revert your client’s latest customizer work. It’s a delicate balance between version control and client autonomy.

Ultimately, managing large Shopify themes with complex JSON templates and section schemas requires a strategic approach. It’s not just about writing clean code; it’s about understanding the platform’s architectural quirks and planning for the long game — especially when it comes to client content and future upgrades. The community discussion really highlighted that while modularity is the goal, you need to be smart about how you achieve it within Shopify’s specific framework. If you’re looking to start a new Shopify store or rethink your current setup, remember these insights from the community — they’re invaluable for building a robust and scalable online presence. You can always get started with a new Shopify store and apply these best practices from day one by signing up for Shopify today!

Share:

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools