I want to try Scalate in this way:
- Provide a scalate template, say: index.html
- Use scala code to render it with some data manually
- Any template format is OK(mustache, Scaml, SSP, Jade)
But I sad found nothing to do this even if I have read all the documentation and source code I found.
In order to make this question more clear, so I have such a template user.html
:
<%@ var user: User %>
<p>Hi ${user.name},</p>
#for (i <- 1 to 3)
<p>${i}</p>
#end
<p>See, I can count!</p>
I want to render it with a user instance User(name="Mike")
. How to do it?