shopify类别上的多个链接列表(侧边栏)

时间:2016-01-18 19:36:52

标签: shopify

另一个shopify问题。我在商店/收藏页面上有一个侧边栏

  

settings.sidebar_categoryblock_linklist

显示我主要收藏品的链接:男人/女人/种类等。 然而,我有另一个基于产品标签的收藏清单:

  

冬/秋/休闲/商务等

如何在侧栏上显示它们?这意味着我如何将多个链接列表作为类别链接列表?

提前致谢 朱莉娅

1 个答案:

答案 0 :(得分:0)

在集合页面中,您可以访问产品具有的所有标记(唯一)。您可以使用这些标记查看是否属于任何集合,然后显示它们。代码如下:

{% for tag in collection.all_tags %}
{% assign c_collection = collections[tag] %} // c_collection is used so the current display page's collection doesn't get disturbed
{% if c_collection.title != '' %}
{{ tag | link_to: c_collection.url,c_collection.title }} // not sure about this, but you can use proper html as well here
{% endif %}
{% endfor %}