【发布时间】:2019-09-12 00:35:44
【问题描述】:
我一直很喜欢使用 Shopify 开发人员和员工提供的 YouTube 视频来学习 Liquid,但我遇到了一个相当奇怪的问题。据我了解,Block 类型是我确定的任意文本字符串。我正在关注的 YouTube 视频使用类型“select”在预设部分创建多个带有标注的块。但是,调试器会将此术语视为“无效 ID”而拒绝。
我的架构如下:
{% schema %}
{
"name": "Footer Section",
"max_blocks": 3,
"settings": [
{
"id": "footer-section-title",
"type": "text",
"label": "Footer Title",
"default": "Footer"
}
],
"blocks": [
{
"type": "select",
"name": "select",
"settings:": [
{
"id": "footer-linktext",
"type": "text",
"label": "Link Text",
"default": "Click Here"
},
{
"id": "footer-linkurl",
"type": "url",
"label": "Link URL",
"default": "Click Here"
}
]
}
],
"presets": [
{
"name": "Footer Blocks",
"category": "Footer",
"blocks": [
{
"type": "select"
},
{
"type": "select"
}
]
}
]
}
{% endschema %}
这与 2017 年视频中出现的几乎相同。情况发生了变化吗?我尝试了其他条款,但都被拒绝了。
提前谢谢你!
【问题讨论】: