【发布时间】:2017-07-24 08:45:25
【问题描述】:
我正在尝试定义架构,以便可以在管理员中编辑和重新排序我的部分。我的两个 section.liquid 文件的底部都有这个。
{% schema %}
{
"presets": [
{
"category": "Custom Content",
"name": "Text",
"settings": {
"heading": "Hello World"
}
}
]
}
{% endschema %}
当我保持“标题”:“Hello World”时,我得到了错误
Status: 422 Unprocessable Entity
Errors: Invalid preset "Text": cannot add settings because there are no
settings defined in the schema.
我不完全确定还需要在哪里定义设置?
此外,当我删除设置部分“标题”:“Hello World”时,它会保存但无法重新排序这些部分,我认为当“预设”部分在架构中时启用?
【问题讨论】: