Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有“健康产品”系列:
然后,使用Liquid,我尝试使用以下代码获取集合“健康产品”的对象:
{{ collections["Healthy Products"] }}
但我得到了“EmptyDrop”:
我的代码有什么问题吗?
您需要在“健康”和“产品”之间加上“-”(连字符),如下所示:
{{ collections["Healthy-Products"] }}
然后,您可以获得"CollectionDrop":
而且,按照惯例,Shopify 使用小写字母:
{{ collections["healthy-products"] }}