自定义部分未出现在 Shopify 的新主题编辑器中
Custom made sections not appearing with Shopify's new theme editor
随着新主题编辑器的发布,我被指派使用 Shopify 的新主题构建器框架构建一个新客户的网站。
一切正常,只是当我在后台创建一个新的 'Section' 时,它没有出现在主题编辑器的 'Sections' 区域中。
知道这里出了什么问题吗?是否有另一个 JSON 文件与我遗漏的部分相关联?
<div id="callToActions">
<div class="grid grid--no-gutters">
<div class=""></div>
</div>
</div>
{% schema %}
{
"name": "Call to Actions",
"class": "index-section index-section--flush",
"settings": [
{
"id": "cta_1_title",
"type": "text",
"label": "CTA 1 Title",
"default": "Dryups Specials"
}
]
}
{% endschema %}
您快完成了,只是缺少一件事。只有定义了预设的部分才会显示为要添加的选项。
此更新将使它显示:
{% schema %}
{
"name": "Call to Actions",
"class": "index-section index-section--flush",
"settings": [
{
"id": "cta_1_title",
"type": "text",
"label": "CTA 1 Title",
"default": "Dryups Specials"
}
],
"presets": [{
"name": "Call to Actions",
"category": "Text"
}]
}
{% endschema %}
注意类别。如果省略,它将在杂项下结束。
随着新主题编辑器的发布,我被指派使用 Shopify 的新主题构建器框架构建一个新客户的网站。
一切正常,只是当我在后台创建一个新的 'Section' 时,它没有出现在主题编辑器的 'Sections' 区域中。
知道这里出了什么问题吗?是否有另一个 JSON 文件与我遗漏的部分相关联?
<div id="callToActions">
<div class="grid grid--no-gutters">
<div class=""></div>
</div>
</div>
{% schema %}
{
"name": "Call to Actions",
"class": "index-section index-section--flush",
"settings": [
{
"id": "cta_1_title",
"type": "text",
"label": "CTA 1 Title",
"default": "Dryups Specials"
}
]
}
{% endschema %}
您快完成了,只是缺少一件事。只有定义了预设的部分才会显示为要添加的选项。
此更新将使它显示:
{% schema %}
{
"name": "Call to Actions",
"class": "index-section index-section--flush",
"settings": [
{
"id": "cta_1_title",
"type": "text",
"label": "CTA 1 Title",
"default": "Dryups Specials"
}
],
"presets": [{
"name": "Call to Actions",
"category": "Text"
}]
}
{% endschema %}
注意类别。如果省略,它将在杂项下结束。