.liquid
files. They are the building blocks of your theme and can be customized through the theme editor.
Overview
Sections:- Are highly customizable through parameters
- Can be reused multiple times with different configurations
- Support nested blocks for complex layouts
- Can be created, deleted, or renamed as needed
Section Structure
A section file typically consists of two parts:- Markup - The Liquid/HTML code that renders the section
- Schema - A JSON definition that specifies the customization options available in the theme editor
Example Section
Schema Components
The schema block defines how the section appears in the theme editor:name
- The display name in the theme editorsettings
- Array of configuration optionsblocks
- Optional block configurationspresets
- Pre-configured settings for adding the sectionkiwi_extra
- Additional settings for the theme editoricon
- 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
Setting Types
Check Input Types for more details.checkbox
: Boolean toggle (true/false)course
: Dropdown populated with all courses of the members areaimage_picker
: Image selectionmodule
: Dropdown group for selecting a module from a course of the members arearange
: Numeric sliderselect
: Toggle button grouptext
: Single-line text input
Section Blocks
Blocks allow for reusable, configurable components within a section. They’re ideal for:- Slides in a carousel
- Items in a gallery
- Custom content areas
Best Practices
- Create reusable sections with clear parameters
- Use meaningful default values
- Group related settings together
- Use blocks for components that need to be individually customizable
- Keep the markup clean and maintainable
Context Available in Sections
In your Liquid section code, you have access to:- The
section
object containing all settings from the template JSON - Global objects like all_courses, all_modules, and all_lessons
- Translation helpers via the
t
filter