Liquid Sections
A Liquid section is a piece of a storefront page you write yourself: HTML, CSS and Liquid tags that read the store's products, collections, posts and menus. A schema at the top declares the settings a merchant edits, so the section works on any store that installs it.
Where Liquid runs
Joomni renders Liquid with the same syntax Shopify themes use, so most of what you know carries over. There are three places a theme can carry markup you wrote:
| Slot | What it is | Reads |
|---|---|---|
| Page section | Any section on any page: a hero, a product grid, a size guide. | Every object, including product, collection and article on their own pages. |
| Header | The theme-level header, shared by every page. | shop, linklists, settings and its own settings. product is empty on most pages a header appears on. |
| Footer | The theme-level footer. | The same as the header. |
Overlays (the cart drawer and quick add) and account, order and checkout pages are Liquid too, each with its own objects. Merchants can add Liquid sections to their own store from the page editor; theme builders ship them inside themes from Joomni Studio.
Your first section
Edit the code and the preview updates as you type. Try changing the route to Homepage: product is empty off a product page, which is why the template checks for it. Open Settings to see the panel a merchant would get from the schema.
Runs in your browser on sample data: the same engine and filters as the storefront. Widgets such as add to cart are simulated: clicking one shows what would happen on a store.
Everything about this section is covered in the next pages: the schema, the objects like product, filters like money, and theme tokens like @color.primary. New to Liquid itself? Start with Liquid basics.
Start from a preset
97 ready-made templates ship in the Liquid section editor. Each one is a complete, publishable section you can edit, and between them they use every technique in this guide. Header and footer presets install onto the theme rather than onto a page, so they change every route at once. You can load any of them in the playground.
What a theme can ship
These rules are checked automatically when a theme is submitted to the theme store. A theme that breaks them cannot be published, so read them before you start rather than after.
Allowed
- All built-in sections, with full control of colour, type, spacing and layout
- Liquid sections for custom markup driven by store data
- CSS, including grid, sticky, scroll-snap, keyframes and :has
- Images from the Joomni media library or images.unsplash.com
- Forms and buttons wired to the storefront through data-joomni-* attributes
- JavaScript inside a Liquid section: a <script> tag, a {% javascript %} block or inline event handlers
Not allowed
- Scripts that read cookies, build code at runtime (eval, new Function) or call document.write
- javascript: URLs
- Scripts loaded from a host that is not on the asset list
- Custom-coded (raw HTML) header and footer sections
- Assets hot-linked from any other host
Your theme runs on other merchants' stores
How this guide is organised
| Page | Read it for |
|---|---|
| Liquid basics | Output, tags, filters, loops and variables, if you have not written Liquid before. |
| Playground | A full editor with every preset, to experiment in. |
| Schema & settings | Declaring the settings a merchant edits, blocks and presets. |
| Objects | Every object a template can read, with an explorer. |
| Filters | money, image_url, colour filters and the rest, with a tester. |
| Tags & snippets | style, javascript, render and the tags you cannot use. |
| Products, collections & posts | Listing the store's catalogue in a section. |
| Storefront widgets | Cart, search, wishlist and carousels without writing JavaScript. |
| Authoring standards | The rules every section is reviewed against. |