我有以下情况。

我的项目有一个“main.scala.html”文件和一个名为“仪表板”的文件夹。 在此仪表板文件夹中是一个“index.scala.html”文件,哪个工作井,包括主文件(@content),具有以下语法:

@main("index.title"){
    <h3>test of dashboard index content</h3>
}
.

所以,我的具体问题现在,我想在这个“仪表板/ index.scala.html”文件中调用另一个“子模板”?!例如子模板称为“仪表板/详细信息.Scala.html”。语法我必须在这个“细节”子模板中声明,以及如何在仪表板文件夹的索引页面中调用此子模板?

我抬头看着wiki 但我没有为我找到工作解决方案,也许我有一些误解。

我期待着你的答案,非常感谢你!

欢呼,

marco

有帮助吗?

解决方案

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()
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top