如何在布局中使用Shopify部分?
我有一个可以从Shopify Customizer编辑的内容的部分。我在多个页面上使用此部分,但是内容保持不变。
有没有办法将本节绑定到整个布局?
因为当您更新内容时,您将其重新输入在使用本节的每个页面模板上。我可以在使用布局的所有页面模板上使用静态HTML,但这并不有用,因为该内容需要从Shopify Customizer中进行编辑。
I have a section with content that can be edited from the Shopify Customizer. I use this section across multiple pages, but the content remains the same.
Is there a way to instead bind this section to a whole layout?
Because when you update the content, you have it re-enter it on every single page template that uses this section. I can have static HTML across all page templates that use a layout, but this isn't useful because the content needs to be editable from the Shopify Customizer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
毕竟,您可以在布局上有一个部分。
我正在做
布局/my-new-layout.liquid:
当我应该做
布局/my-new-layout.liquid时:
请参考
如果您想将仅模板的部分转换为仅布局的部分, ...
{%章节'yourSection'%}
。You can have a section across a layout after all.
I was doing
layout/my-new-layout.liquid:
when I was supposed to be doing
layout/my-new-layout.liquid:
For reference
If you're trying to convert a template-only section to a layout-only section...
{% section 'your-section' %}
in the layout (i.e. layout/my-new-layout.liquid).