【发布时间】:2018-09-26 23:55:15
【问题描述】:
我是 Shopify 的新手并在 Shopify 中构建我的自定义主题我想在 settings_schema.json 中添加“块”,因为我添加到部分架构中,这可能吗?如果是,那么我该如何添加它?请帮帮我
我添加了以下代码:
[
{
"name": "theme_info",
"theme_name": "Slate",
"theme_version": "0.11.0",
"theme_author": "Shopify",
"theme_documentation_url": "https:\/\/shopify.github.io\/slate\/",
"theme_support_url": "https:\/\/github.com\/Shopify\/slate"
},
{
"name": "Colors",
"settings": [
{
"type": "header",
"content": "General colors"
},
{
"type": "color",
"id": "color_theme",
"label": "Theme color",
"default": "#efeeeb",
"info": "Used for theme"
},
{
"type": "color",
"id": "color_primary",
"label": "Primary color",
"default": "#4d4d4d",
"info": "Used for text links, and primary buttons"
}
],
"blocks": [
{
"type": "product_colors",
"name": "Product colors",
"settings": [
{
"type": "color",
"id": "color_label",
"label": "Color label",
"default": "red"
},
{
"type": "color",
"id": "color_code",
"label": "Color code",
"default": "#ff0000"
}
]
}
]
}
]
但它给出了一个错误:
错误:第 2 节:“块”不是有效属性
任何其他解决方案也值得赞赏
【问题讨论】: