質問
私は以下の状況を持っています。
マイプロジェクトには、「main.scala.html」ファイルと「ダッシュボード」というフォルダがあります。
このダッシュボードのフォルダは、 "index.scala.html"ファイルです。メインファイル(@content)の内側を含めて、次の構文を含めてが機能します。
.
@main("index.title"){
<h3>test of dashboard index content</h3>
}
だから、私の特定の質問は、この "Dashboard / index.scala.html"ファイル内に別の "Sub Template"を呼び出したいですか。例えばサブテンプレートは "dashboard / detail.scala.html"と呼ばれます。この「詳細」サブテンプレートを宣言しなければならない構文は、ダッシュボードフォルダの索引ページ内にこのサブテンプレートを呼び出す必要がありますか?
Wiki https://github.com/playframework/play20/wiki/javatempletusecases 私は私のために働く解決策を見つけなかった、多分私はいくつかの誤解を持っています。
あなたの答えを楽しみにしています、ありがとうございました!
歓声、
マルコ
解決
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()
所属していません StackOverflow