You can use @for
loop on scala templates like this :
@for((t, index) <- tests.zipWithIndex) {
@if(index == 0) {
// first index
...
} else {
...
}
}
The index
variable is automatically assigned and and incremented for each loop starting with 0
as the first index.