Including a Static Section on a page is similar to including a snippet. The only difference is instead of using the word include
you use the word section
.
{% section 'section-file-name' %}
Using this tag will "hardcode" the section into your theme at the place where you put the code and cannot be moved or deleted from the page.
To use Dynamic Sections, you need to use the preset
control at the bottom of the schema settings for that section.
{% schema %}
{
"presets": [
{
"category": "Custom Content",
"name": "Text",
"settings": {
"heading": "Hello World"
},
"blocks": [
{
"type": "text",
"settings": {
"content": "Once upon a time..."
}
}
]
}
]
}
{% endschema %}
By using presets, this will enable you to move and add your section around your page as you require. It also allows you to fill in the section with dummy content so that you can view exactly how the section will look on your page without actually having to add it to the page.