I’m just starting to work with Play! 2.0 and I’m having trouble finding any good documentation or tutorials around the view markup. I had my “main” view defined as such:
@(title: Html, nav: String = "")(content: Html)
I’m not sure why the title param is/was Html, so I changed it to String.
Now, in another view I had this:
@title = {
Sign Up
}
@main(title, nav = "signup") { etc...}
I want to change the definition of title to a String so I changed that definition to:
@title = "My Title goes here"
@main(title, nav = "signup") { etc...}
But when I try that, I get the error: “not found: value title” when I refresh the page. How do I define strings here like the Html is defined? I realize I can just put the string in the call to main on that second line, BUT what I’m wondering here is just how to set @title the same way for a string as it was done for Html.
Also, anyone have a link to some good markup tutorials or documentation (the equivalent to this for 2.0 would be great)? Thanks
See http://www.playframework.org/documentation/2.0.4/ScalaTemplates Declaring reusable blocks