Sections
Learn how to create and customize theme sections.
Introduction to Sections
Sections are modular components that allow you to build flexible and customizable theme layouts in Finqu. They can be added, removed, and reordered to create unique page structures.
How Sections Are Rendered
Sections are rendered in templates using either the content_for_index placeholder (which outputs all sections assigned to that template) or the section tag to render a specific section:
{% section 'section-name' %}Section Directory
All section files are stored in the sections directory of your theme. Each file represents a single section and contains its Liquid markup, logic, and schema.
Section Schema
Each section file defines its configuration using a {% schema %} tag. The schema describes the section’s name, tag, class, category, keywords, and settings. For example:
{% schema %}
{
"name": {
"en": "Accordion tabs",
"fi": "Välilehdet"
},
"tag": "section",
"class": "section section-accordion-tabs",
"category": "theme-featured",
"keywords": {
"en": ["accordion tabs", "faq", "guide"],
"fi": ["välilehdet", "ukk", "opas"]
},
"settings": {
// ...section settings...
}
}
{% endschema %}- The
categoryproperty must match one of the categories defined in your theme’ssettings_schema.jsonfile.
Section Schema Properties
Below is a table describing the main properties available in a section schema, along with explanations and examples for each:
Each property helps define how the section appears and behaves in the theme editor and on the storefront. For more details on settings and blocks, see the relevant documentation sections below.
Section Groups
A section group is an ordered, merchant-managed collection of sections that is shared across pages — for example a header or footer region that appears on every template. Unlike a template’s own sections (which live only on that template), the sections in a group are stored once and rendered wherever the group is included.
Define a group
Create a JSON file under the theme’s section-groups/ folder. The filename (without extension) is the group name.
section-groups/header-group.json
{
"name": {
"en": "Header",
"fi": "Ylätunniste"
},
"max_sections": 10,
"allowed_sections": ["announcement-bar", "header", "navigation"],
"default_sections": [
{
"name": "announcement-bar",
"title": "Announcement",
"settings": {},
"blocks": [],
"sticky": false
},
{
"name": "header",
"title": "Header",
"settings": {},
"blocks": [],
"sticky": true
}
]
}Definition fields
default_sections entry
Render a group in a layout or template with the {% sections %} tag. See Templates & Layouts for layout examples.
Opt a section into a group
A section declares which group(s) it belongs to via section_groups in its {% schema %}. When set, the section is only addable inside those groups — never in free template content.
sections/announcement-bar.liquid
<div class="announcement-bar"> ... </div>
{% schema %}
{
"name": { "en": "Announcement bar" },
"section_groups": ["header-group"],
"settings": []
}
{% endschema %}How the two whitelists interact
A section is offered for a group when both are satisfied:
- The section’s
section_groupsincludes the group (or is empty — then it may be used in any group), and - The group’s
allowed_sectionsincludes the section (or is empty — then any opted-in section is allowed).
The stricter of the two always wins.
Section creatability and placement flags
These apply to sections regardless of groups:
Group section data is stored on the release configuration under section_groups[groupName].sections, not on individual templates, which is what makes a group shared across pages. If a group has no stored configuration yet, default_sections is used to build the initial layout.
Blocks in Sections
Sections can contain blocks, which are reusable content elements. Blocks are rendered inside a section using the container tag. You can optionally define an id for the container:
{% container 'id' %}The container tag is not a block tag, but a way to group and render blocks within a section. The id can be used to target a specific container for styling or logic. Id must be unique within the section and must be defined if the section contains multiple containers.
Use allowed_blocks in the section schema to restrict which blocks merchants can add at the section’s top level. See Blocks for the full resolution rules.
Sticky sections in templates
Sections listed in a template’s template_sections schema are sticky: always present on that template, reorderable but not removable by merchants. See Templates & Layouts for how sticky sections interact with {{ content_for_index }}.
Section Best Practices
- Use clear and descriptive names and categories for your sections.
- Organize settings and blocks logically for ease of use.
- Reuse blocks and settings where possible to keep sections maintainable.
- Test your sections in different templates to ensure flexibility and compatibility.