Created
September 26, 2012 13:53
-
-
Save BowlingX/3788190 to your computer and use it in GitHub Desktop.
Scalate with Scalate Compiler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait TemplateBindings extends ScalateSupport { | |
self: ScalatraServlet => | |
override protected def defaultTemplatePath: List[String] = List("/webTmpl/views") | |
override protected def createTemplateEngine(config: ConfigT) = { | |
val engine = super.createTemplateEngine(config) | |
engine.layoutStrategy = new DefaultLayoutStrategy(engine, | |
TemplateEngine.templateTypes.map("/webTmpl/layouts/default." + _): _*) | |
engine.allowReload = false | |
engine.allowCaching = false | |
engine.packagePrefix = "webTmpl" | |
engine | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment