<div data-gb-custom-block data-tag="schema">
{
"name": "Example Section",
"elements": [
{
"type": "text",
"id": "heading",
"label": "Heading",
"default": "This is an example heading"
}
]
}
</div>
Section Schema
The schema of a section is what allows the user to input data into your theme without having to touch the code. A schema is made up of different elements to create extremely customizable pages.
A schema also gives you the ability to let the user add and remove a section from pages such as index.liquid by adding presets.
Multiple presets can be added to a schema giving you the ability to allow users to add a section to a page with different settings values.
<div data-gb-custom-block data-tag="schema">
{
"name": "Example Section",
"elements": [
{
"type": "text",
"id": "heading",
"label": "Heading",
"default": "This is an example heading"
}
],
"presets": [
{
"name": "Example Section 1",
"category": "Content",
"settings": {
"heading": "I love sections"
}
},
{
"name": "Example Section 2",
"category": "Content",
"settings": {
"heading": "I also love sections!"
}
}
]
}
</div>
Blocks
If you think of a section as a row then its columns are what kajabi calls blocks. Blocks are groupings of settings that can be added and removed from a section by the user. Blocks are added to the schema and looped over inside the section in liquid.