I have defined a simple array in the developer template window.
{% set days = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"] %}
Now I want to create a for loop such as (this is pseudo-code}}
this is what I’m trying to do in the dev window
for i = 1 to 7
Day: {{i}} {{days[ i - 1]}}
next
So I’ll see in the dev window output:
Day: sun
Day: mon
Day: tue
Day: wed
Day: thu
Day: fri
Day: sat
I’m specifically looking to use numbers instead of a for-each
type of loop, because I might want the loop to be for i = 6 to 7
instead.