Hi, how would you make a .json template use one layout or another? it was clear for me with liquid templates but no so clear with 2.0 update.
you basically just had to wrap the liquid template with {% layout ‘layout-name’ %}.
Now with schemas, is not so clear
1 Like
{
"layout": "theme.liquid",
"sections": {
"main": {
"type": "main-page",
"settings": {
"padding_top": 36,
"padding_bottom": 36
}
}
},
"order": [
"main"
]
}
Your JSON file should look like the above by default. See the bottom of this page for documentation: https://shopify.dev/themes/architecture/templates/json-templates#schema
2 Likes
Everything is correct except {“layout”: “theme.liquid”}
{“layout”: “theme”} or {“layout”: “custom-layout”}
.liquid should not be added.
1 Like