【问题标题】:How to Increment/Decrement count in shopify如何在shopify中增加/减少计数
【发布时间】:2020-12-22 09:51:30
【问题描述】:

我需要使用带有增量值的计数,并且我使用了下面的代码但是有些它不起作用。

{% assign count = 0 %}

{% for something in somethings %}
  {% count++ %}
{% endfor %}

{{ count }}

【问题讨论】:

    标签: shopify shopify-template


    【解决方案1】:

    请更换

    {% count++ %}
    

    {% assign count = count | plus: 1 %}
    

    【讨论】:

      猜你喜欢
      • 2021-04-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-13
      • 2011-04-13
      • 2015-07-24
      • 1970-01-01
      相关资源
      最近更新 更多