[英]Shopify (Liquid) if product has a tag, echo that tag
I'm trying to find product tags that meet a condition, and then display those tag(s). 我正在尝试查找符合条件的产品标签,然后显示这些标签。
This gets me all the tags for a product... 这让我获得了产品的所有标签...
{% for tag in product.tags %}
{% if product.tags contains '336699' %}
{{ tag }}
{% endif %}
{% endfor %}
How can I just echo the tags that meet the 'contains' criteria? 我该如何回显符合“包含”条件的标签?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.