How to change the template engine in the Play Framework?

How can I change the template mechanism in Play! to a different engine than the default? Can you give an example?

+4
source share
2 answers

I don’t even ask why you want to do this.

It's simple, Play can return Resultwith ANY content that you give it to him, so you can just use:

return ok("<h1>Code rendered from your alternative engine</h1>").as("text/html");
+3
source

It depends on which template engine you want to use. There are several options in the Playback Modules Catalog .

+4
source

Source: https://habr.com/ru/post/1528217/


All Articles