{% schema %}
tag allows you to define section attributes and settings to enable customization options in the theme editor. It defines how sections appear, behave, and what configuration options are available to users.
Each section can have only a single {% schema %}
tag, which must contain valid JSON using the attributes listed below. The tag can be placed anywhere within the section file, but cannot be nested inside another tag.
Note:
The{% schema %}
tag is a Liquid tag. However, it doesnβt output its contents or render any Liquid included inside it.
Properties
The section title shown in the theme editor. It may be translated using
t:
prefix plus a valid key from schema translation files. More details can be found in Locales.The maximum number of times a section can be added to a template or section group. Default is unlimited.
An array of section-specific settings that allow users to customize the section. Each setting must have a unique ID within the section. See settings for detailed configuration.
An array of reusable content modules that can be added, removed, and reordered within a section. Each block must have a unique type and name. See blocks for detailed configuration.
The maximum number of blocks allowed in the section. Default is 50.
Predefined section configurations that users can select when adding sections to a template. See presets for detailed configuration.
Default configuration for statically rendered sections.
Restricts a section to certain template page types and section group types. See template restrictions for detailed configuration.
Prevents a section from being used on certain template page types and section group types. See template restrictions for detailed configuration.
Additional settings for the theme editor
icon
- Icon to be associated with this section type in the theme editorblocks_hidden_if
- Object representing a condition that hides section blocks inside the theme editor if satisfiedsetting
- Which setting of this section to checkvalue
- Expected value for the block section to be hidden