Declare variable in a Play2 scala template

@defining("foo") { title=>
  <div>@title</div>
  ...
}

basically, you have to wrap the block in which you are going to use it

Leave a Comment