Skip to Content

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 category property must match one of the categories defined in your theme’s settings_schema.json file.

Section Schema Properties

Below is a table describing the main properties available in a section schema, along with explanations and examples for each:

PropertyDescriptionExample
nameThe display name of the section, usually localized for different languages.{ "en": "Accordion tabs", "fi": "Välilehdet" }
tagThe HTML tag or identifier for the section."section"
classCSS classes applied to the section container."section section-accordion-tabs"
categoryThe category for the section, must match a category in settings_schema.json."theme-featured"
keywordsSearch keywords for the section, localized for different languages.{ "en": ["accordion tabs", "faq"], "fi": ["välilehdet", "ukk"] }
settingsConfiguration options for the section, such as text fields, images, etc.{ /* ...section settings... */ }
blocks(Optional) Defines block types that can be used within the section.[ { "type": "tab", "name": { "en": "Tab" } } ]
templatesTemplate types the section is available on. Empty or absent = all templates.["product"]
section_groupsRestrict the section to specific section groups. When set, the section is only addable inside those groups.["header-group"]
allowed_blocksWhitelist of block names accepted at the section’s top level. Empty or absent = all public, template-compatible blocks.["product-title", "buy-button"]
is_creatableIf false, the section cannot be added by merchants (e.g. a fixed, theme-controlled section).false

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

FieldTypeDefaultDescription
namestring | localized objectDisplay name of the group in the designer.
max_sectionsnumber25Maximum number of sections a merchant may add to the group.
allowed_sectionsstring[][] (all)Whitelist of section names addable in this group. Empty/absent = any section that opts into the group.
default_sectionsobject[][]Sections rendered when the merchant has not customized the group yet.

default_sections entry

FieldTypeDescription
namestringSection name (file in sections/).
titlestringLabel shown in the designer section list.
settingsobjectInitial section settings.
blocksarrayInitial blocks for the section.
stickybooleanIf true, the section can be reordered but not removed.

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:

  1. The section’s section_groups includes the group (or is empty — then it may be used in any group), and
  2. The group’s allowed_sections includes 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:

Schema fieldEffect
is_creatable: falseThe section cannot be added by merchants at all (e.g. a fixed, theme-controlled section).
section_groups: [...]The section is group-only; it will not appear in the normal “add section” list for template content.
templates: [...]The section is only offered on matching template types. The template type is the part before the first dot — e.g. product and product.custom both have type product.

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.