Reputation: 109
I need to use count with increment value and I have using below code But some how it's not working.
{% assign count = 0 %}
{% for something in somethings %}
{% count++ %}
{% endfor %}
{{ count }}
Upvotes: 1
Views: 1440
Reputation: 1751
please replace
{% count++ %}
to
{% assign count = count | plus: 1 %}
Upvotes: 1