Unknown tag 'schema'
Closed this issue · 2 comments
atoupet-toki commented
Hi guys! Thanks for your nice job!
Question for you! How do you add schema in a custom template page.
This is what I did:
<h1>{{ page.title }}</h1>
<div>{{ page.content }}</div>
{% schema %}
{
"default": {
"settings": {
"heading": "Hello World"
},
"blocks": [
{
"type": "text",
"settings": {
"content": "Once upon a time..."
}
}
]
}
}
{% endschema %}
And get : Liquid syntax error (line 3): Unknown tag 'schema'
during npm start.
Thanks a lot for your answer!
krjo commented
schema
can only be added to section liquid files. You would then render that section in your liquid template with {% section 'section-name' %}
(if your section file was named section-name.liquid).
atoupet-toki commented
Ohhh damnn I see :)
New in shopify, thanks for your help!