The Play Framework 2 template language is pretty nice. However, though it’s ‘inspired by’ Microsoft’s Razor language, one important design decision is different: how you ‘es
Here is a workaround:
@import views.Common.section
@sec1 = { Blah
}
@sec2 = { Blah blah
}
@structuredpage("Dashboard")(
section("Latest Requests")(sec1),
section("Your Details")(sec2)
)
previous attempt:
I think your wish makes it to complicated. Templates should be simple. Here is a simple alternative:
index.scala.html
@structuredpage("Dashboard"){
@section("Latest Requests") {
Blah
}
@section("Your Details") {
Blah blah
}
}
section.scala.html
@(title: String)(content: Html)
@title
@content
structuredpage.scala.html
@(title: String)(sections: Html)
@main(title){
@sections
}
I made a gist: https://gist.github.com/4280577 . So you can check it out and play with it.