I just googled for 'for loop', but it looks like velocity has 'foreach' only.
How do I use 'for loop' in velocity template?
Wanted to add that iteration information inside foreach loop can be accessed from special $foreach
property:
#foreach ($foo in $bar)
count: $foreach.count
index: $foreach.index
first: $foreach.first
last: $foreach.last
#end
(last time I checked last
contained a bug though)