Shopify 重新排序部分和可编辑内容?
Shopify reorder sections and editable content?
我正在尝试定义架构,以便可以在管理员中编辑和重新排序我的部分。我在我的两个 section.liquid 文件的底部有这个。
{% schema %}
{
"presets": [
{
"category": "Custom Content",
"name": "Text",
"settings": {
"heading": "Hello World"
}
}
]
}
{% endschema %}
当我保留 "heading" 时:"Hello World" 我收到错误
Status: 422 Unprocessable Entity
Errors: Invalid preset "Text": cannot add settings because there are no
settings defined in the schema.
我不完全确定我还需要在哪里定义设置?
此外,当我删除设置部分 "heading" 时:"Hello World" 它保存但无法重新排序部分,我认为当 "presets" 部分是在架构中?
部分代码丢失。
在为设置定义预设值之前,您需要按照此处文档中的说明自行定义设置:https://help.shopify.com/themes/development/theme-editor/sections#settings
HTH
我正在尝试定义架构,以便可以在管理员中编辑和重新排序我的部分。我在我的两个 section.liquid 文件的底部有这个。
{% schema %}
{
"presets": [
{
"category": "Custom Content",
"name": "Text",
"settings": {
"heading": "Hello World"
}
}
]
}
{% endschema %}
当我保留 "heading" 时:"Hello World" 我收到错误
Status: 422 Unprocessable Entity
Errors: Invalid preset "Text": cannot add settings because there are no
settings defined in the schema.
我不完全确定我还需要在哪里定义设置?
此外,当我删除设置部分 "heading" 时:"Hello World" 它保存但无法重新排序部分,我认为当 "presets" 部分是在架构中?
部分代码丢失。 在为设置定义预设值之前,您需要按照此处文档中的说明自行定义设置:https://help.shopify.com/themes/development/theme-editor/sections#settings
HTH