Section schema

Every field of a section's schema, every setting type, and the rules each must follow.

The {% schema %} block holds one JSON object. It describes the section to the theme editor and to the platform, and prints nothing.

Fields#

Field

Required

Meaning

name

Yes

The section's name, unique in the theme.

kind

No

section (default), layout, embed or block. See Sections.

target

No

The global surface a layout or embed section renders in.

icon

No

The icon shown for the section in the editor.

ctx_needs

No

The store data the section reads. See CTX.

settings

No

The section's settings.

blocks

No

The blocks the section accepts.

presets

No

Ready-made versions of the section offered when a merchant adds one.

migrations

No

How a new version converts what stores saved with an older one. See Migrations.

Settings#

json
{ "id": "heading", "type": "text", "default": "Welcome",
  "editor": { "label": "Heading", "group": "content" } }

Key

Meaning

id

Unique in the section. The template reads settings.<id>.

type

One of the setting types below.

default

The value a new section starts with.

editor

label, optional group and optional info: help text shown under the setting, for a setting whose label alone cannot say what it does. A setting without editor is not shown to merchants.

options

For select: a list of { "value", "label" }.

fields

For object: a list of { "key", "type", "label" }.

min, max, step, unit

For range: min and max are required, step and unit optional.

visible_if

Show the setting only when another setting has one of the given values, { "setting": "layout", "values": ["grid"] }, or only while another setting is set or empty, { "setting": "image", "set": true }. Use set for settings that mean something only with, or without, another one: alt text and focus points while an image is picked, a stand-in photo until it is. A rule takes values or set, not both. The rule only hides the control in the editor; the value still applies.

Write label, group, info, option labels and a preset's name and category as keys from the theme's editor translations, locales/<locale>.schema.json: fieldLabel.<label> for setting, option and field labels, fieldGroup.<group> for groups and preset categories, fieldInfo.<info> for setting help text, and sectionName.<name> for section and preset names. Define every key in each of the editor's languages: en.schema.json, de.schema.json, es.schema.json, fr.schema.json and it.schema.json. The merchant sees the label in their admin language; a missing one is refused (see Editing rules).

Setting types#

Type

Editor control

The template reads

text

Single-line text

Text

textarea

Multi-line text

Text

richtext

Rich text editor

Formatted HTML, cleaned of anything unsafe

number

Number

Number

range

Slider

Number

checkbox

Toggle

true or false

select

Drop-down

The chosen option's value

color

Colour picker

Hex colour

color_scheme

One of the theme's colour schemes

The scheme's id

image

Image from the media library

The picked image: url, alt_text (in the shopper's language), width, height and media_type. It prints as its URL; resize it with image_url. Empty when nothing is picked or the file was deleted.

video

Video from the media library

The picked video: url, alt_text, width, height, mime_type, media_type and preview_image (with its url, or empty). It prints as its URL.

url

Link

URL

object

A group of the declared fields

Object of field values

vascula

Code editor

The rendered output of the merchant's Vascula code

menu

Menu picker

See Bound settings

product, collection, category, vendor, brand, page, blog_post, blog_category, policy

Search and pick one

The picked item, or nothing if it was deleted

product_list, collection_list

Pick and order several

A list of the picked items

metaobject

One custom content entry of the type named by metaobject_type

The entry (custom content): its fields by key, display_name, url and the rest, or null when it is a draft or deleted

metaobject_list

Several entries of the type named by metaobject_type, in order (max 1 to 50)

A list of entries; drafts and deleted entries are left out

Font settings#

font_picker is a global theme setting: declare it in config/settings_schema.json. Its options come from the platform, never from the theme: the platform's font library and, in each store, the fonts the merchant uploaded, which the editor shows as a group called Your fonts. A value is a library handle such as inter, or store:<id> for one of the store's own fonts. A theme's default and its style presets use library handles.

json
{ "id": "heading_font", "type": "font_picker", "default": "fraunces", "editor": { "label": "heading_font" } }

Read the font only through its CSS variable, var(--tf-font-<setting id>). The platform adds the @font-face rules and the variable to every page: a library font's files, or a store font's files served from the store's own domain under /__tf/fonts/, followed by a sans-serif fallback stack. Themes never see font URLs, so the same CSS works with any font the merchant picks.

css
h1, h2, h3 { font-family: var(--tf-font-heading_font); }

Blocks#

json
"blocks": {
  "max": 8,
  "default": ["slide", "slide"],
  "types": [
    { "type": "slide",
      "editor": { "label": "Slide" },
      "settings": [
        { "id": "caption", "type": "text", "editor": { "label": "Caption" } }
      ] }
  ]
}

Field

Meaning

types

The block types this section defines. Each has a type, an editor label and its own settings.

default

The blocks a newly added section starts with.

max

The most blocks a merchant can add. Omit for no limit.

accept_theme_blocks

Accept the theme's shared theme blocks.

theme_blocks

With accept_theme_blocks, the only theme blocks this slot takes, by name: ["slide"] for a slideshow, the content blocks for a slide. The editor offers only these, and a store can't save others here. Omit it to take every theme block.

accept_app_blocks

Accept blocks from installed apps.

Presets#

A preset is a ready-made version of the section in the editor's "Add section" list.

json
"presets": [
  { "name": "Two testimonials", "category": "Social proof",
    "settings": { "heading": "Loved by customers" },
    "blocks": [ { "type": "quote" }, { "type": "quote" } ] }
]

Preset settings must be declared settings, and preset blocks must be declared block types, or theme blocks (theme:<name>) when the section accepts them.

Migrations#

Stores keep what merchants saved with your earlier versions. When a version renames, moves or retires settings or block types, declare migrations: when a store updates the theme, the platform applies them to every saved page and its translations once, before checking the pages against the new schema. Nothing reads the old settings afterwards; undoing the update within 30 days brings the old pages back. Never leave a store's saved values without their setting: every setting your earlier version declares is still declared, or a migration moves it (rename_setting, move_setting, combine_point, settings_to_blocks) or drops it (remove_setting). A Theme Store version that drops one without a migration is refused (THEME_VERSION_ORPHANS_SETTINGS), and a code save on a store that has saved a value for it is refused (THEME_CODE_ORPHANS_SETTING_VALUES).

Op

Fields

What it does

rename_block

from_type, to_type, source_defaults

Renames a local block type. to_type is another local type, or theme:<name> for a theme block the slot accepts; that block's own migrations then convert the settings the instances brought along. With a theme block, source_defaults lists the retired type's defaults: see below.

rename_setting

from, to

Renames a setting within the section or within one block type.

move_setting

from, to

Moves a setting between the section and its local blocks.

remove_setting

from

Drops a retired setting's saved values on purpose. Use it when a setting goes away and nothing replaces it; without it, a code save that would leave a store's saved value behind is refused, and so is a Theme Store version that drops a setting of the listing's latest version.

set_default

to, default

Fills a setting that saved instances don't have yet.

combine_point

from, from_y, to

Combines two number settings into one point setting.

settings_to_blocks

blocks, source_defaults

Turns settings into theme blocks: see below.

from and to are { "setting": "<id>" } (remove_setting takes only from), with "block_type": "<type>" for a local block's setting. A source must be gone from the new schema while its migration is declared, and every id is unique. Keep a migration in later versions, so stores that skip a version still convert.

A local block type's settings fall back to that type's defaults. When two local types with different defaults become the same theme block, give each rename_block the defaults its type showed in source_defaults. Renamed instances that never saved a setting get it before the theme block's own migrations run; locale overlays keep their translations only. Each key must be a setting the theme block declares or one its migrations retire.

json
"migrations": [
  { "id": "text-to-footer-column", "op": "rename_block", "from_type": "text", "to_type": "theme:footer-column",
    "source_defaults": { "heading": "@t:sections.footer.text.heading" } },
  { "id": "menu-to-footer-column", "op": "rename_block", "from_type": "menu", "to_type": "theme:footer-column",
    "source_defaults": { "heading": "@t:sections.footer.menu.heading", "menu": "main-menu" } }
]

Settings to blocks#

settings_to_blocks moves copy out of fixed settings into theme blocks the merchant can reorder and remove. Declare it on the section or theme block that owned the settings; it needs accept_theme_blocks, and every block type in it must be one the slot takes.

json
"blocks": { "accept_theme_blocks": true, "theme_blocks": ["heading", "text", "buttons"] },
"migrations": [
  { "id": "tile-copy-to-blocks", "op": "settings_to_blocks",
    "blocks": [
      { "type": "theme:heading", "settings": { "heading": "heading" }, "copy": { "link": "link" } },
      { "type": "theme:text", "settings": { "text": "text" } },
      { "type": "theme:buttons", "settings": { "button_label": "button_label" },
        "copy": { "button_link": "link" }, "values": { "button_style": "link" },
        "when": ["button_label", "link"] }
    ],
    "source_defaults": { "heading": "New arrivals" } }
]

Field

Meaning

blocks

The blocks to create, in order, before the instance's existing blocks. Each has a type (theme:<name>) and settings: the new block's setting ids mapped to the retired settings they take their value from.

copy

More of the new block's settings, taken from settings the owner keeps (a tile keeps its link; its heading and button get it too).

values

Fixed values for the new block's settings.

when

Settings that must all have a value for the block to be created: any setting the migration maps (for this block or another one), or one this block copies. A heading can depend on the text it used to sit above. Without it, any mapped setting with a value creates the block.

source_defaults

The retired settings' old defaults. An instance that never saved one showed its default, so it converts as if it had saved it.

A block whose settings would all be blank is not created, and the retired settings are removed. Created blocks get ids from the owner's id and the migration's id, so a page and its translations convert to the same blocks. An instance that already stores a blocks list only converts settings it still has, so applying the migration again changes nothing. The platform checks the mapped settings against the block files when the theme is uploaded.

Theme settings#

config/settings_schema.json takes migrations too, for the theme settings: rename_setting (from and to) and remove_setting (from), without block_type. A store's saved theme setting values move to the new id, or are dropped, when the code save or theme update writes the new schema.

json
{
  "schema_version": 1,
  "settings": [ { "id": "announcement_text", "type": "text", "editor": { "label": "announcement_text" } } ],
  "migrations": [
    { "id": "banner-to-announcement", "op": "rename_setting", "from": { "setting": "banner_text" }, "to": { "setting": "announcement_text" } },
    { "id": "drop-legacy-font-size", "op": "remove_setting", "from": { "setting": "legacy_font_size" } }
  ]
}

Editing rules#

Merchants change their store in the theme editor, not in code, and an assistant editing a theme through the Store MCP does the same: when a change can be made through template and setting values (templates/<page>.json, theme setting values), it is made there. Code changes are for new capability, and every new choice they bring ships as a setting. These rules are part of the theme contract (editing.merchant_editable, editing.prefer_settings, settings.complete, settings.no_orphans).

Check

Refuses

What to do

hardcoded-copy

Text written into markup: a text node, or an alt, title, placeholder, aria-label or label attribute.

Print it from a setting ({{ settings.heading }}) or a storefront string ({{ 'cart.title' | t }}). Text without letters (digits, punctuation, symbols such as × or →) is not copy.

hardcoded-asset-url

An image, video, font, stylesheet or page URL written into markup or section CSS: an absolute URL or a path to assets/.

Take it from an image, video or url setting, or a file the theme ships through asset_url. Inline data: icons and links to tringify.com (a "Powered by" link) are fine.

hardcoded-color

A colour literal (hex, rgb(), hsl(), a colour name) in section CSS or a style, fill, stroke or color attribute.

Use the colour scheme's variables (var(--text), var(--bg)), a token from tokens.json (each is a --<name> variable) or a color setting. transparent, currentColor and black or white with transparency (shadows, scrims) are fine.

setting-missing-label

An editable setting, option, field, block type, section or preset whose label key is missing from locales/<lang>.schema.json for en, de, es, fr or it.

Add the key to all five editor language files.

setting-type-mismatch (warns)

A text or textarea setting whose id says it holds a colour, link, menu, image, video, date or store item (button_color, menu_handle, product_handle).

Use the type made for the value: color, url, menu, image, video, datetime, product and the other pickers. Give every new setting a sensible default.

The checks run in themecheck (tringify theme check), at upload and at Theme Store publish, where any finding refuses the theme. A code save on a store (the code editor, Store MCP save_theme_code, theme sync, a zip uploaded into a theme) is refused only for a finding it adds, so a store's theme with older findings can still be edited. Installing a version already published is not re-checked.

Rules#

  • name is required. Setting ids are unique in the section and in each block type.
  • An editable setting uses a supported type. select needs options, object needs fields with unique keys, range needs min below max.
  • visible_if names another setting and at least one value.
  • Every block type has at least one editable setting, and every type in default is declared.
  • A block file (kind: block) has no target and no presets, and its blocks may only accept theme blocks.
  • Saved settings may contain only declared settings. A section with blocks always stores a blocks list, which may be empty.

Gate section settings#

For required sections on coming_soon, password, and maintenance, use the exact text setting IDs title and message: the platform overlays translated gate copy there. Migrate older heading/text IDs with rename_setting and update source reads. collect_emails is a checkbox whose schema default applies when the saved value is absent; explicit false overrides that default. The server also considers enabled collection on other sections and visible blocks. Runtime-only values such as notify_state, notify_success, notify_error, password_error, locale, return_to, and language_options are supplied by the platform and should not become merchant-editable outcome controls. See Gate pages.

Listing section settings#

On the shop, collection, category, vendor, brand and search pages the platform reads the product grid itself and reads two setting IDs of the page's sections:

  • page_size (a number): products per page. The platform uses 24 when no section sets it and never more than 60. The collection, category, vendor and brand list pages read it too, as items per page.
  • default_sort (text): the sort used when the shopper has not chosen one, a key from products.sort.options. An explicit ?sort= always wins.

Both apply before the grid is read, on full pages and on section refreshes. A section makes them merchant choices by declaring them as settings:

json
{ "id": "page_size", "type": "range", "min": 8, "max": 60, "step": 4, "default": 24,
  "editor": { "label": "page_size", "group": "layout" } }

Paging is the platform's: there is no pagination tag. products.pagination gives the current page, the page count, the total and the previous and next URLs. The first 50 pages are numbered (?page=); past them next_url carries a cursor and only moves forward, so total_pages stops at 50. A Load more button or infinite scroll fetches next_url as a section refresh and appends the new items. Each template has its own sections, so a merchant can choose a page size per page type, or per item through an alternate template.

The editing checks ignore Vascula inline comments ({# ... #}). Fixed HTTPS sharing actions for Facebook, Pinterest, X and WhatsApp may be used in link destinations: https://www.facebook.com/sharer/sharer.php, https://www.pinterest.com/pin/create/button/, https://pinterest.com/pin/create/button/, https://twitter.com/intent/tweet, https://x.com/intent/tweet, https://x.com/intent/post and https://wa.me/. Their query parameters supply the shared page. Profile links, merchant destinations and media URLs still come from settings or theme assets. Shopper copy belongs in locale keys, and palette colours belong in theme tokens or colour settings.