Shopify Builds>Primitives>JSON templates

JSON templates

Definition

A JSON template is a Shopify template written as data rather than as Liquid. It lists the sections on a page, their order, their settings and their blocks, and the theme editor writes it. Because the file is data, a merchant can recompose a page without a developer, and a section's settings can be bound to dynamic sources.

Documented at shopify.dev, JSON templates.

How We've Used It

The template file is where we put the decisions a merchandiser should own. Which sections a page has, in what order, with which settings and which bindings, is page composition, and it belongs in data rather than in a Liquid conditional somebody has to redeploy. It also decides how many sections get written. A thin section that renders a page's own content inside a branded shell can be cloned per page type and wired into several templates, which is cheaper than one shared section carrying a conditional for every case. The cost is that a section exists on a page only if the template says so, so an orphaned section stays invisible until somebody audits.

Builds Using It

One further gated build uses it; its page follows.

Related Entities

Builds