Closed chenos closed 7 years ago
Multi-digit Support
{% for i in (20..30) %} {{i}} {% endfor %}
Improving for tag parameters(limit, offset, reversed)
{% for i in (1..10) limit:1 %} {{i}} {% endfor %} {% for i in (1..5) offset:3 %} {{i}} {% endfor %} {% for i in (1..5) reversed %} {{i}} {% endfor %}
All values in Liquid are truthy except nil (null in php) and false. Zero, empty string and empty array are all truthy.
For loop else
{% for item in array %}+{% else %}-{% endfor %}
Use square bracket [ ] notation to access a specific item in an array.
[ ]
{{ a.b.c }} {{ a['b'].c }} {{ a.b['c'] }} {{ a['b']['c'] }} {% assign b = 'b' %}{{ a[b]['c'] }}
Fixing float variable bug.
{{ 1 | plus: 1.0 }} // output 2.0
Multi-digit Support
Improving for tag parameters(limit, offset, reversed)
All values in Liquid are truthy except nil (null in php) and false. Zero, empty string and empty array are all truthy.
For loop else
Use square bracket
[ ]
notation to access a specific item in an array.Fixing float variable bug.