Reputation: 105238
I'm looking for an alternative to rails templates and yield in playframework, version 2.0.
Is there something similar to that? I couldn't find it by browsing the docs.
Upvotes: 0
Views: 243
Reputation: 1892
As mentioned in Somatik's answer Play provides a default template language that is similar to rails' ERB but it is simple enough to replace it with any template engine that you want. You might want to look into Scalate which provides template engines for Mustache and SCAML/Jade (both very similar to HAML).
This discussion on the Play 2.0 Google group points to further documentation on the subject of integrating Scalate into a Play 2.0 application.
Upvotes: 0
Reputation: 4743
I don't know rails but it looks to me like what is explained here for playframework: http://www.playframework.org/documentation/2.0.1/ScalaTemplateUseCases
@(title: String)(content: Html)
<!DOCTYPE html>
<html>
<head>
<title>@title</title>
</head>
<body>
<section class="content">@content</section>
</body>
</html>
Upvotes: 1