【问题标题】:Get "Brand" Object on a Product Page in a Bigcommerce Stencil Theme在 Bigcommerce Stencil 主题中的产品页面上获取“品牌”对象
【发布时间】:2016-02-17 08:41:51
【问题描述】:

我正在 Stencil 框架上开发 Bigcommerce 主题,并希望在单个产品页面上显示品牌的所有产品。因此,如果我正在查看特定品牌的产品 A,我还想在同一页面上显示产品 B、产品 C 等的信息。我尝试在 product.html 页面中添加以下前置内容,假设我可以获取该对象,但我仍然无法访问品牌对象。

---
brand:
    products:
        limit: {{theme_settings.brandpage_products_per_page}}
---

如果我将 {{json brand.products }} 添加到 html,则没有数据。这是否可以在产品页面/上下文中实现?

【问题讨论】:

    标签: bigcommerce


    【解决方案1】:

    品牌对象只能使用品牌页面中的 frontmatter 进行修改。目前无法在产品详细信息页面上提取给定品牌的产品。

    请参阅有关全局调用的文档,以了解您可以使用 frontmatter 将什么内容拉入任何页面:https://stencil.bigcommerce.com/docs/front-matter-variables#Front-ref-global

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多