views:

35

answers:

1

I'm using the NVelocity from the Castle project and according to the velocity specs I should be able to access the loop counter like this:

$foreach.counter

But I can't get it to work so I suspect that it has not been implemented in NVelocity.

Can anyone confirm this?

A: 

Yes, it's implemented, but it's called $velocityCount

Mauricio Scheffer
Thanks! just for reference, is this documented somewhere?
Ola Herrdahl
@Ola: it's actually in the old velocity specs: http://velocity.apache.org/engine/releases/velocity-1.5/vtl-reference-guide.html it seems that java velocity has recently changed this.
Mauricio Scheffer