Skip to content

Instantly share code, notes, and snippets.

@guillaumebort
Created September 8, 2011 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guillaumebort/1203802 to your computer and use it in GitHub Desktop.
Save guillaumebort/1203802 to your computer and use it in GitHub Desktop.
Sample Play template used from Java
@(user:models.User, accounts:java.util.List[models.Account])
<h1>User @user.name has @accounts.size @("account".pluralize(accounts))</h1>
@for(account <- accounts) {
<h2>Account @accounts.number</h2>
@if(account.messages.isEmpty) {
<p>No messages for this account.</p>
} else {
<ul>
@for(msg <- account.messages) {
<li>@msg</li>
}
</ul>
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment