liquid filter modulo 2 code example
Example 1: mod operation in shopify
Input : {{ 3 | modulo: 2 }}
Output : 1
Example 2: mod operation in shopify inside condition
{% capture modulo %}{{ forloop.index | divided_by: 4 }}{% endcapture %}
{% if modulo == 0 %}
<div>echo something</div>
{% endif %}