sachnr
March 18, 2024, 5:59am
1
{% if section.settings.enable %}
<p> Hello, World! </p>
{% endif %}
{% schema %}
{
"name": "Hello World",
"settings": [
{
"type": "checkbox",
"id": "enable",
"label": "enable p",
"default": false
}
]
}
{% endschema %}
heres my sections/hello-world.liquid. how do i display it in my store.
tim_1
March 18, 2024, 6:09am
2
Section files must define presets in their schema to support being added to JSON templates using the theme editor. Section files without presets should be included in the JSON file manually, and can’t be removed using the theme editor.
https://shopify.dev/docs/themes/architecture/sections/integrate-sections-with-the-theme-editor#:~:text=Section%20files%20must%20define%20presets,removed%20using%20the%20theme%20editor .
sachnr
March 18, 2024, 6:12am
3
hey, thanks for the reply, are there any resource to learn about this with code examples or better documentation?
tim_1
March 18, 2024, 6:18am
4
Shopify documentation is pretty reasonable. Plus their free themes are (were) a good example.
You can google a lot of tutorials.
1 Like