Shopify 液体 - 加载部分和来自单独文件的页面数据?

发布于 2025-01-10 05:29:22 字数 246 浏览 3 评论 0原文

我有一个客户,我为他构建了一个自定义常见问题解答部分(缩略图、动画等),并将其包含在默认产品布局 (product.json) 中,以及它自己的自定义常见问题解答页面模板 (page.faq.json)。他希望他在一个文件上所做的编辑能够在另一个文件上复制,但他们自然会将任何输入的数据保存到自己的文件中。有没有办法让默认产品和页面模板写入单独的文件并从单独的文件读取,以便它们之间的数据可以保持同步? “单一事实来源”选项?

I have a client for whom I built a custom FAQ section (thumbnails, animations, etc.) and included it in the Default Product layout (product.json) and it's own custom FAQ page template (page.faq.json). He would like edits he makes on one to be replicated on the other, but naturally they save any entered data to their own files. Is there a way to have the default product and page template write to- and read from a separate file so the data between them can stay in sync? A "single source of truth" option?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夜灵血窟げ 2025-01-17 05:29:22

使用元字段资源。商家可以轻松编辑它,并且您可以在多个地方使用它。书中最古老的把戏。它们也可以是文本或 JSON。那里有很多自由。

Use a Metafield resource. The Merchant can edit it easily, and you can use it in more than one place. The oldest trick in the book. They can be text or JSON too. Lots of freedom there.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文