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 |
|---|---|---|
|
Yes |
The section's name, unique in the theme. |
|
No |
|
|
No |
The global surface a |
|
No |
The icon shown for the section in the editor. |
|
No |
The store data the section reads. See CTX. |
|
No |
The section's settings. |
|
No |
The blocks the section accepts. |
|
No |
Ready-made versions of the section offered when a merchant adds one. |
|
No |
How a new version converts what stores saved with an older one. See Migrations. |
Settings#
{ "id": "heading", "type": "text", "default": "Welcome",
"editor": { "label": "Heading", "group": "content" } }
Key |
Meaning |
|---|---|
|
Unique in the section. The template reads |
|
One of the setting types below. |
|
The value a new section starts with. |
|
|
|
For |
|
For |
|
For |
|
Show the setting only when another setting has one of the given values, |
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 |
|---|---|---|
|
Single-line text |
Text |
|
Multi-line text |
Text |
|
Rich text editor |
Formatted HTML, cleaned of anything unsafe |
|
Number |
Number |
|
Slider |
Number |
|
Toggle |
|
|
Drop-down |
The chosen option's |
|
Colour picker |
Hex colour |
|
One of the theme's colour schemes |
The scheme's id |
|
Image from the media library |
The picked image: |
|
Video from the media library |
The picked video: |
|
Link |
URL |
|
A group of the declared |
Object of field values |
|
Code editor |
The rendered output of the merchant's Vascula code |
|
Menu picker |
See Bound settings |
|
Search and pick one |
The picked item, or nothing if it was deleted |
|
Pick and order several |
A list of the picked items |
|
One custom content entry of the type named by |
The entry (custom content): its fields by key, |
|
Several entries of the type named by |
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.
{ "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.
h1, h2, h3 { font-family: var(--tf-font-heading_font); }
Blocks#
"blocks": {
"max": 8,
"default": ["slide", "slide"],
"types": [
{ "type": "slide",
"editor": { "label": "Slide" },
"settings": [
{ "id": "caption", "type": "text", "editor": { "label": "Caption" } }
] }
]
}
Field |
Meaning |
|---|---|
|
The block types this section defines. Each has a |
|
The blocks a newly added section starts with. |
|
The most blocks a merchant can add. Omit for no limit. |
|
Accept the theme's shared theme blocks. |
|
With |
|
Accept blocks from installed apps. |
Presets#
A preset is a ready-made version of the section in the editor's "Add section" list.
"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 |
|---|---|---|
|
|
Renames a local block type. |
|
|
Renames a setting within the section or within one block type. |
|
|
Moves a setting between the section and its local blocks. |
|
|
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. |
|
|
Fills a setting that saved instances don't have yet. |
|
|
Combines two number settings into one |
|
|
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.
"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.
"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 |
|---|---|
|
The blocks to create, in order, before the instance's existing blocks. Each has a |
|
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). |
|
Fixed values for the new block's settings. |
|
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. |
|
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.
{
"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 |
|---|---|---|
|
Text written into markup: a text node, or an |
Print it from a setting ( |
|
An image, video, font, stylesheet or page URL written into markup or section CSS: an absolute URL or a path to |
Take it from an |
|
A colour literal (hex, |
Use the colour scheme's variables ( |
|
An editable setting, option, field, block type, section or preset whose label key is missing from |
Add the key to all five editor language files. |
|
A |
Use the type made for the value: |
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#
nameis required. Setting ids are unique in the section and in each block type.- An editable setting uses a supported type.
selectneedsoptions,objectneedsfieldswith unique keys,rangeneedsminbelowmax. visible_ifnames another setting and at least one value.- Every block type has at least one editable setting, and every type in
defaultis declared. - A block file (
kind: block) has notargetand no presets, and itsblocksmay only accept theme blocks. - Saved settings may contain only declared settings. A section with blocks always stores a
blockslist, 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 fromproducts.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:
{ "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.