How to use templatesImport in build.sbt with Playframework 2.2.x

前端 未结 1 714
-上瘾入骨i
-上瘾入骨i 2021-01-23 05:20

I have to import some reusable blocks in all my templates.

I have defined a block in app\\views\\blocks\\header.scala.html, to include the block in all my t

相关标签:
1条回答
  • 2021-01-23 05:48

    I have found the solution to my problem: In build.sbt I have to move the line templatesImport += "views.html.blocks._" after the line play.Project.playJavaSettings.

    This is due to the fact that playJavaSettings initializes the variable templatesImport with the defaults imports.

    0 讨论(0)
提交回复
热议问题