Sections are the core elements used to construct theme pages. Each section defines the structure and functionality of a page module, and merchants can add, delete, move, and edit sections in the theme editor.
Every section has its own directory under the theme's sections directory. It must contain an .html file with the same name, while matching .css and .js files are optional.
The .html file generally contains the section layout and its schema configuration. Merchant settings declared in the schema are available through section.settings.
Private blocks live in a blocks directory inside their section. They let developers divide a section's functionality into smaller modules and assemble those modules in the section.
Block templates receive predefined values through the props object. Sections render them with Sline block tags and declare the available block types in the section schema.
Send AJAX requests to fetch HTML snippets for specific sections, then use those snippets to replace page elements dynamically.
This updates section content without reloading the entire page. SHOPLINE's Section Rendering API provides the asynchronous rendering capability.
A section schema can define name, class, tag, settings, blocks, max_blocks, limit, presets, and icon attributes. Settings become editable controls in the theme editor.
The schema tag declares configuration and does not render content. Settings IDs must be unique, and a section needs at least one preset to appear when merchants add sections in the editor.
A section group collects related sections and their configurations so they render together. Groups are defined in JSON files stored at the root of the sections directory, typically as header-group.json and footer-group.json.
Layouts reference groups with the Sline sections tag. In the theme editor, merchants can add, delete, and reorder the sections within a group.
Fixed sections are referenced directly from a theme layout with the Sline section tag. They are intended for parts of the theme that must remain in a defined position.
Merchants can change a fixed section's settings, but they cannot add, delete, or rearrange the section through the theme editor.
Use the official guide to create, configure, group, and render theme sections.
For hands-on preparation, read Sline basics (Chinese) and the Dawn and Bottle architecture comparison (Chinese). Inspect template syntax with the AST Explorer, or follow the SHOPLINE CLI workflow (Chinese) for theme preview and delivery.
Read the Official Sections Guide