Documentation Index
Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt
Use this file to discover all available pages before exploring further.
Templates and Sections
A LaunchMyStore page is a template that composes sections, each of which composes blocks. This is the same model Shopify themes have used since the 2.0 release — every existing 2.0 theme works on LaunchMyStore unchanged. This page explains:- How JSON templates declare page composition.
- How template resolution picks the right file for a URL.
- How sections are reused across templates.
- How block-level configuration is layered on top.
- How section groups turn the header / footer into editable units.
- How the legacy
.liquid/.aquatemplate fallback works.
Anatomy of a JSON template
A JSON template is a manifest. It lists the sections to render and their display order. The renderer reads it once, looks up each section’s Aqua source fromsections/<type>.aqua, merges the merchant’s settings, and
emits HTML.
Required keys
| Key | Type | Required | Description |
|---|---|---|---|
sections | object | Yes | Map of section_id → section instance. |
order | array | Yes | Render order. Items must be keys in sections. |
layout | string | false | No | Override the layout ("layout":"password" or false). |
wrapper | string | No | Optional wrapper element override. |
Section instance
| Key | Type | Description |
|---|---|---|
type | string | Filename of the section template under sections/ (no extension). |
settings | object | Merchant values for the section’s schema settings. |
blocks | object | Map of block_id → block instance. |
block_order | array | Block render order. |
disabled | bool | If true, the section is skipped at render. |
custom_css | string | Optional per-instance CSS injected with a scoped data attribute. |
Block instance
| Key | Type | Description |
|---|---|---|
type | string | Block type as declared in the section’s schema blocks array. |
settings | object | Merchant values for the block’s settings. |
static | bool | Marks the block as fixed — merchants can’t remove or reorder it. |
name | string | Display name in the editor (supports t: translations). |
blocks | object | Nested blocks (for blocks that themselves render blocks). |
Template resolution
When a request hits a URL, the renderer picks a template file by the following rules, in order. The first one that exists wins. For/products/<handle> where the product has template_suffix: "alternate":
templates/product.alternate.jsontemplates/product.alternate.aquatemplates/product.alternate.liquidtemplates/product.jsontemplates/product.aquatemplates/product.liquid- — fail with 500 —
page
and customers/*), the lookup is even simpler:
AssetLoader.exists() (cached) and
AssetLoader.read() (cached) — no filesystem scan per request after the
first hit.
Selecting a template suffix
Merchants can attach a per-resource template suffix through:- The product / page / collection / blog / article admin form
(
template_suffixcolumn on the resource). - The URL query parameter
?view=<suffix>(Shopify-compatible, primarily used for AJAX section fetches).
Layout override per template
A JSON template can override the layout that wraps it:"layout": false disables the layout entirely — the rendered body becomes
the response. See Layouts for details.
How a section renders
Take this snippet from a JSON template:- Opens
sections/featured-collection.aqua. - Reads its
{% schema %}block (cached viaAssetLoader.schemaCache). - Builds a
sectionobject exposingsection.id = "main",section.settings = { ... },section.blocks = [...]. - Strips the schema block from the source.
- Compiles and renders the remaining template with
sectionin scope.
section.lms_attributes (and its alias section.shopify_attributes) emits
data-section-id="main" data-section-type="featured-collection" for the
editor.
Blocks inside sections
Blocks layer over sections. A section’s schema declares which block types it accepts; the JSON template instance picks values per block and lists them inblock_order.
Section schema declaration
{ "type": "@app" } reserves a slot for any storefront block installed by
an app extension.
Rendering blocks
section.blocks is the ordered iterator (matches block_order). Looking up
by id (section.blocks['title']) is also supported.
Static blocks
A block instance with"static": true is locked — merchants can’t move,
duplicate, or delete it in the editor, and it always renders at its declared
position. Use this for blocks that are structurally required (the product
title on a product page, for example):
_) combined with "static": true is
the canonical way to ship “fixed” elements that the merchant can still
configure but can’t remove.
Section reuse across templates
Sections are theme-wide. The samefeatured-collection.aqua file can appear
in index.json, collection.json, and page.welcome.json, each with
different settings.
Restricting section availability
A section’s schema can opt out of certain templates viaenabled_on /
disabled_on:
Section groups
A section group is an ordered list of sections that travel together, declared as a JSON manifest undersections/. Most themes have at least
header-group.json and footer-group.json.
type (the group
name) and name (label shown in the editor).
The {% sections '<group>' %} tag
To render a group, use the sections tag from any Liquid/Aqua context —
usually the layout:
sections/<name>-group.json, then iterates the order array
and renders each section in turn, just like a JSON template.
{% sections '...' %} (plural) renders a group.
{% section '...' %} (singular, legacy) renders a single static section
file. Most themes prefer the group form because it gives merchants a
single-button entry to reorder header/footer elements in the editor.Group types beyond header / footer
You can ship any group your theme needs:sections/overlay-group.json— global modals, cart drawers, search popups.sections/aside-group.json— sidebar widgets for collection pages.sections/popups-group.json— newsletter / age gate / cookie banner.
{% sections 'overlay-group' %} in the layout. The
editor surfaces each group as a separately-editable region.
Liquid template fallback
For pages that don’t fit the JSON model, a theme can ship a plain.aqua / .liquid template that is the whole page body:
- Detects
{% layout '<name>' %}if present and switches the wrapper layout (layout/<name>.aqua). - Detects
{% layout none %}and renders the file body without any layout — useful for AJAX endpoints. - Compiles the file once and renders with the page’s global object in
scope (e.g.
gift_cardfortemplates/gift_card.aqua).
index.json as a section
composition but render gift_card.aqua as a single-file template.
Worked example: product.json
A minimal product page:
/products/blue-shirt:
- The renderer resolves
templates/product.json. - Fetches the product (handle
blue-shirt) and exposes it asproduct. - Renders sections in
order:main→related→recently_viewed. mainisproduct-information.aquawith the schema-driven blocks above; the section’s loop renders title → price → variant → buy → description.- The result is concatenated as
content_for_layoutand wrapped inlayout/theme.aqua.
product-information section file is reused on
templates/product.alternate.json with different settings and a different
block order — no duplication of the section’s HTML or schema.
Patterns
Per-handle landing pages
For/pages/about, ship templates/page.about.json with custom sections.
The default page.json still handles every other page.
Themed collection pages
Addtemplates/collection.featured.json with a different hero and
filtering UI, then let merchants set template_suffix = "featured" on
selected collections.
Section sharing between template types
Definesections/newsletter.aqua once and reference it from index.json,
page.json, cart.json, and footer-group.json. Merchants edit each
instance independently.
AJAX section fetches
/products/<handle>?section_id=related returns just that section’s HTML.
Middleware intercepts and rewrites to /api/themes/render-section. Use
this for “Load more” / “Quick view” / cart drawer updates without a full
page navigation.
Next steps
Schema
Define a section’s settings, blocks, and presets.
Input settings
Every available input type for schemas.
Layouts
Wrap the rendered body in HTML.
Tags
{% section %}, {% sections %}, {% render %}, and friends.