如何访问Bigcommerce模具主题对象
我对Bigcommerce和车把都是新手。我目前正在建设一个网站根据设计,我使用的是商家模具主题 目前,我在home.html模板文件中硬编码了3个部分,但我希望根据每个产品的ID动态地为其提供产品信息(url、名称、描述) 该店目前只销售3种产品,我有一个特色产品区,将所有3种产品都设置为特色产品。这很好用。第二部分是我想访问or(添加了文档链接),但我不知道如何访问。他们没有代码示例,我真的找不到解决方法。对于如何使用这些物品的任何帮助,我将不胜感激 我甚至请求Bigcommerce的支持,他们把我送到这里。那里的支持人员对他们平台上的开发没有任何线索,所以他们把我送到这里 干杯 下面是my home.html文件中的代码如何访问Bigcommerce模具主题对象,bigcommerce,Bigcommerce,我对Bigcommerce和车把都是新手。我目前正在建设一个网站根据设计,我使用的是商家模具主题 目前,我在home.html模板文件中硬编码了3个部分,但我希望根据每个产品的ID动态地为其提供产品信息(url、名称、描述) 该店目前只销售3种产品,我有一个特色产品区,将所有3种产品都设置为特色产品。这很好用。第二部分是我想访问or(添加了文档链接),但我不知道如何访问。他们没有代码示例,我真的找不到解决方法。对于如何使用这些物品的任何帮助,我将不胜感激 我甚至请求Bigcommerce的支持
{{#if products.featured}}
<section class="products-featured section">
<h4 class="section-title">{{lang 'home.featured_products'}}</h4>
<div class="wrapper">
{{#each products.featured}}
{{> components/products/product-grid-item
quick_shop=../theme_settings.quick_shop
}}
{{/each}}
</div>
</section>
{{/if}}
<section id="gg-one" class="glue-section">
<div class="container">
<div class="text-col">
<h2 class="section-title">Grizzly One</h2>
<p class="caption-content">North America's first liquid polyurethane glue - a high-tech adhesive widely used by European woodworks and craftsmen for decades.</p>
<ul class="glue-feats">
<li>Ideal for proffessional, commercial, and industrial woodworking needs.</li>
<li>Even bonds to oily and exotic woods!</li>
</ul>
<div class="buttons">
</div>
</div>
<div class="img-col">
</div>
</div>
</section>
<section id="gg-structan" class="glue-section">
<div class="container">
<div class="img-col">
</div>
<div class="text-col">
<h2 class="section-title">Grizzly Structan</h2>
<p class="caption-content">This heavy-bodied, cartridge-loaded
polyurethane adhesive is stronger than liquid polyurethane
glues.</p>
<ul class="glue-feats">
<li>Perfect for wood, stone, tile, metal, and glass - dries to a tough elastic texture.</li>
<li>Industrial strength - ideal for professional and commercial applications.</li>
</ul>
<div class="buttons">
</div>
</div>
</div>
</section>
<section id="gg-xpress" class="glue-section">
<div class="container">
<div class="text-col">
<h2 class="section-title">Grizzly Xpress</h2>
<p class="caption-content">All the srength and body of a semi-gel adhesive<br> with a quick setting and curing time.</p>
<ul class="glue-feats">
<li>The first and only semi-gel adhesive available in North America!</li>
<li>Quick, professional-strength bond for wood, stone, tile, metal and glass.</li>
</ul>
<div class="buttons">
</div>
</div>
<div class="img-col">
<div class="inner">
<img src="https://cdn3.bigcommerce.com/s-jgnuwblrjb/product_images/uploaded_images/grizzly-xpress-home.png">
</div>
</div>
</div>
</section>
{{{#if products.featured}
{{lang'home.特色产品}
{{{#每种产品.特色}
{{>组件/产品/产品网格项
quick\u shop=../theme\u settings.quick\u shop
}}
{{/每个}}
{{/if}
灰熊一号
北美第一种液体聚氨酯胶-一种高科技粘合剂,数十年来被欧洲木工和工匠广泛使用
- 非常适合专业、商业和工业木工需求
- 甚至连油性和异国情调的树林都有李>
灰熊结构
这种厚重的、装有子弹的
聚氨酯粘合剂比液体聚氨酯强
胶水
- 适用于木材、石头、瓷砖、金属和玻璃-干燥至坚韧的弹性纹理
- 工业实力-专业和商业应用的理想选择
灰熊快线
具有快速凝固和固化时间的半凝胶粘合剂的所有长度和主体
- 北美第一款也是唯一一款半凝胶粘合剂李>
- 适用于木材、石材、瓷砖、金属和玻璃的快速专业强度粘合。
为特色部分下方的动态部分创建一个组件。那就做吧
{{#each products.featured}}
{{> components/products/your-new-component }}
{{/each}}
在组件内部,您将获得产品对象,您可以通过简单的{{product.id}或{{product.title}获得数据