Delivered

Ability to use variables in for tag

  • Liquid
Ability to use limit and offset param value via variables.
Not only via pure numbers.
Example:

{% assign array = "1,2,3,4,5,6,7,8,9" | split: "," %}
{% assign lim = 3 %}
{% assign offset  = 3 %}

{% for item in array limit:lim offset: offset  reversed %}
    //{{item}}
{% endfor %}
Ability to use from and to param value via variables.
Not only via pure numbers.
Example:

{% assign from = 1 %}
{% assign to  = 5 %}

{% for item in (from..to) %}
    //{{item}}
{% endfor %}
Earlier such code caused:
- Liquid Error: Object reference not set to an instance of an object.