【问题标题】:Shopify If Tag does not containShopify 如果标签不包含
【发布时间】:2019-03-20 22:17:19
【问题描述】:

Shopify Liquid Smarty 标签中 contains 的反义词是什么?

我基本上想从带有标签hideme搜索页面中隐藏产品

示例代码:{% if product.tags contains 'hideme' %}。在此我想使用does not contain 而不是contains

【问题讨论】:

    标签: shopify smarty


    【解决方案1】:

    {% if %} 的反义词是 {% unless %},因此您的代码将更改为:

    {% unless product.tags contains 'hideme' %}
         <blinky> stuff mmm good for cookie monster </blinky>
    {% endunless %}
    

    【讨论】:

      猜你喜欢
      • 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
      相关资源
      最近更新 更多