In fact, I never saw @if or tried PlayFramework. But if that is the case, then I think that when you are actually trying to request a letter, it is already out of scope. What happens if you adjust the brackets as follows?
@for(col <- List.range(0,12)) { <td> @if(col % 2 == 0) { @{val letter = someMap(col) <div class="z@(letter)@(letter)s"></div> } } </td> }
Daniel Hinojosa
source share