You can use:
@Shared.main(title = "Home",head, content)
For security and performance reasons, Play compiles templates into Scala functions and saves them in the /target/scala-2.9.1/src_managed/main/views managed folder, so you can scan it to find the correct path.
rules to easily view files saved using a template:
/app/views/viewName.scala.ext (where ext can be html , xml or txt ). Playback will compile the views: view.ext.viewName- and for
/app/views/SomeSub/OtherSub/viewName.scala.ext it will be: view.ext.SomeSub.OtherSub.viewName
So:
/app/views/general.scala.html = views.html.general /app/views/Main/index.scala.html = views.html.Main.index /app/views/Api/usersList.scala.xml = views.xml.Api.usersList /app/views/Email/English/body.scala.txt = views.txt.Email.English.body
etc...
There is some case with the package /app/views/tags , which is automatically imported into the views, so you can use /app/views/tags/myTag.scala.html with only the syntax: @tags.myTag(args) in any view.
source share