Section Groups
Section Groups let you designate header and footer sections that render outside the main page body — controlled via the Visual Editor's dedicated Header and Footer tabs.
Overview
Section Groups are a template-level concept that organises sections into named groups. The two built-in group names are header-group and footer-group. Sections assigned to these groups render outside the main page content area — typically via {% sections 'header-group' %} and {% sections 'footer-group' %} calls in layouts/theme.liquid.
In the Visual Editor, grouped sections have their own dedicated tabs (Header, Footer) in the left sidebar, separate from the page body sections. This mirrors the Shopify Online Store 2.0 model and makes header/footer management intuitive for merchants.
Schema Reference
Groups are declared inside a template *.json file via a top-level groups object. Each key is the group name; each value has a name (display label) and a sections array listing the section keys (from the template'ssections map) that belong to the group.
| Field | Type | Description |
|---|---|---|
groups | object | Top-level key in the template JSON. Optional — templates without groups render all sections in order[]. |
groups.<name>.name | string | Display name shown in the Visual Editor sidebar tab. |
groups.<name>.sections | string[] | Array of section keys from this template's sections map that belong to the group. |
// templates/index.json — section groups are defined per template file.
// A section with "type": "header" in a group named "header-group"
// renders before the page body and outside the main page scroll.
{
"name": "Home",
"sections": {
"header": { "type": "header", "settings": { "sticky": true } },
"announcement": { "type": "announcement-bar", "settings": { "text": "Free shipping on orders over $50" } },
"hero": { "type": "hero", "settings": { "heading": "Welcome" } },
"featured": { "type": "product-grid", "settings": { "collection": null } },
"footer": { "type": "footer", "settings": {} }
},
"order": ["header", "announcement", "hero", "featured", "footer"],
"groups": {
"header-group": {
"name": "Header",
"sections": ["header", "announcement"]
},
"footer-group": {
"name": "Footer",
"sections": ["footer"]
}
}
}header-group
The header-group group key is the convention for sections that appear at the top of every page. Typically includes the header section (navigation, logo, cart icon) and optionally an announcement-bar section.
Render in layouts/theme.liquid with:
{%- sections 'header-group' -%}The Linen marketplace theme uses sticky header behaviour with a condensed variant on scroll — both configured via settings in the header section schema, not hard-coded in CSS.
footer-group
The footer-group group key contains sections that appear at the bottom of every page. Typically just the footer section, but can include cookie-banner or chat-widget sections.
{%- sections 'footer-group' -%}Alternate Templates
Alternate templates are template JSON files with a dot-separated suffix: templates/<base>.<suffix>.json. Supported base types: product, page, collection, article. Other base templates (cart, search, blog, 404, account, login, register) are singletons and do not accept suffix variants.
Alternate templates are discovered automatically by the three-layer resolver — no registration step is needed. On the admin entity edit form (product / collection / page / article), a Theme template dropdown appears listing all available variants. Selecting one writes template_suffix on the entity.
The dropdown auto-hides when only the default template exists, so themes without alternate templates never show a one-option select to merchants.
// Alternate template files follow the naming convention:
// templates/<base>.<suffix>.json
//
// Where <base> is one of: product | page | collection | article
//
// Example: a "lookbook" alternate layout for product pages
// File: templates/product.lookbook.json
{
"name": "Lookbook",
"sections": {
"header": { "type": "header", "settings": { "sticky": true } },
"main": { "type": "main-product", "settings": {} },
"editorial":{ "type": "image-with-text","settings": { "layout": "image_right" } },
"footer": { "type": "footer", "settings": {} }
},
"order": ["header", "main", "editorial", "footer"],
"groups": {
"header-group": { "name": "Header", "sections": ["header"] },
"footer-group": { "name": "Footer", "sections": ["footer"] }
}
}
// To assign the lookbook template to a product:
// Admin → Products → [product] → Theme template → select "Lookbook"
// This writes template_suffix = "lookbook" on the product entity.
// The storefront resolver then picks templates/product.lookbook.json.Editing Section Groups
In the Visual Editor (Admin → Online Store → Themes → Customize):
- Header tab — lists sections in
header-group. Click any section to edit its settings. Drag to reorder within the group. - Footer tab — lists sections in
footer-group. Same controls as header. - Page body — the default tab for sections not in any group. Supports drag-to-reorder and the + Add panel for adding new sections.
Reordering sections within a group updates the groups.<name>.sections array in the template JSON via a PUT /admin/theme/library/:id/files/templates%2F<page>.json call with CAS via the version field.
To edit a grouped section's code, open the code editor and find the section file in sections/. The Visual Editor and code editor share the same SSE event stream — saves in one appear instantly in the other.