Posted on 18. May 2009 12:14 by B-Virtual
As you all might know, or not know, I'm a hardcore user of the Vici Project. So I will try to post some tips and tricks on Vici projects here.
This piece of code helps those who would like to loop over a range of items or just use a counter to loop over.
{{foreach i in [1...20]}}
Insert your HTML template part here
{{endfor}}
Ok, this is easy, it just loops over the numbers 1 to 20 for i. But what if I would like to do it the other way around. Just do.
{{foreach i in [20...1]}}
Insert your HTML template part here
{{endfor}}