Reputation: 655
I have the following situation.
My project has a "main.scala.html" file and a folder called "dashboard". In this dashboard folder is a "index.scala.html" file, which works well with including inside the main file (@content) with the following syntax:
@main("index.title"){
<h3>test of dashboard index content</h3>
}
So, my specific question is now, I want to call another "sub template" inside this "dashboard/index.scala.html" file?! e.g. the sub-template is called "dashboard/detail.scala.html". How is the syntax I must declare in this "detail" sub-template and how do I have to call this sub-template inside the index page of the dashboard folder?
I looked up the wiki https://github.com/playframework/Play20/wiki/JavaTemplateUseCases but I didn't found a working solution for me, maybe I have some misunderstandings.
I'm looking forward to your answers, thank you very much!
Cheers,
Marco
Upvotes: 2
Views: 1778
Reputation: 34
You can just call it as you would call any other function or template from your controller. There is an example in the documentation
Home
@common.sideBar()
Upvotes: 1