A Tringify theme is a folder of templates, settings and assets that renders every page of a store. You write it in Vascula, a template language for HTML; it reads store data through CTX; and merchants arrange its sections and change its settings in the theme editor without touching your code. This page is the short version. Build your first theme is the full walkthrough.
What a theme is made of#
Part |
What it does |
|---|---|
Sections ( |
The building blocks of a page: header, hero, product, cart, footer. Each has a schema (its settings and the data it reads) and markup. Author them in |
Theme blocks ( |
Smaller pieces merchants add inside sections: headings, text, buttons, images. |
Templates ( |
Which sections each page type (home, product, collection, cart…) starts with. |
Settings and tokens ( |
Theme-wide settings, colour schemes and design tokens that merchants change in the editor. |
Locales ( |
Storefront text in each language, and editor labels in English, German, Spanish, French and Italian. |
Demo content ( |
The sample catalogue used by local previews and the Theme Store. |
|
The theme's name, version and section list. |
See Theme package structure for every file.
A section in two files#
A section declares its settings and the store data it reads in schema.json:
{
"name": "product-note",
"ctx_needs": ["product"],
"settings": [
{
"id": "note",
"type": "text",
"default": "Ships in two days.",
"editor": { "label": "note", "group": "content" }
}
]
}
and renders them in body.html:
<p>{{ product.title }} · {{ product.price.current | money }}</p>
{% if settings.note %}
<p>{{ settings.note }}</p>
{% endif %}
ctx_needs is the contract: a section sees only the CTX roots it lists, and the storefront loads only what the page's sections ask for. The merchant's values arrive as settings.<id>. Format prices with the money filter; never do arithmetic on money in markup.
The workflow#
tringify theme init my-theme # start from Canvas, the default theme
cd my-theme
tringify theme preview # local preview with the demo catalogue
tringify theme build # compile src/sections into sections/
tringify theme check # the same checks as an upload
tringify theme dev --store STORE_ID # live sync into an unpublished theme on a development store
tringify theme publish --listing LISTING_ID --version 1.0.0 # a new Theme Store version
Install the CLI and sign in first; see Tringify CLI. Every published version is permanent, so each update gets a new version number.
Where to go next#
To |
Read |
|---|---|
Build a theme step by step |
|
Know what the platform guarantees and requires |
|
Write sections and their settings |
|
Find the data a section can read |
|
Learn the template language |
|
Add forms such as cart, sign-in and newsletter |
|
Publish to the Theme Store |