Questions tagged [scalate]

Scalate is a Scala based template engine for generating text and markup using the following template formats: Mustache, Scaml, Jade, and SSP.

Scalate is a Scala 2.8 based template engine for generating text and markup which can be used in the following frameworks and environments:

Scalate supports the following template formats

  • Mustache which is a Scala dialect of Mustache for logic-less templates which also work inside the browser using mustache.js
  • Scaml which is a Scala dialect of Haml and is very DRY for generating HTML / XHTML
  • Jade which is an even more DRY dialect of Scaml for HTML / XHTML markup generation
  • SSP which is like Velocity, JSP or Erb from Rails

Scalate also has a powerful web console and command line shell which includes converters from JSP or HTML to Scalate

Still confused? Check out which template engine is right for me, why Scalate or how Scalate compares to JSP or Lift

72 questions
1
vote
1 answer

jade "include" doesn't work as expected

Referencing another Jade file from within one: include ../widget Renders HTML like this: ../widget Using Scalatra, specifically. What am I doing wrong?
user375566
1
vote
1 answer

Integrating Scalate into Play 2.0

A feature of the Play 2.0 framework I appreciate is statically compiled views. If a controller renders a view without supplying the correct number of well-typed arguments, a compile error is thrown. This greatly increases maintainability as…
DCKing
  • 4,253
  • 2
  • 28
  • 43
0
votes
1 answer

scalate templates won`t work

couple days ago I've created spring webapp with scalate template endine. Everything worked great but from yesterday I can't get it running. This is what I get org.springframework.web.util.NestedServletException: Handler processing failed; nested…
Fixus
  • 4,631
  • 10
  • 38
  • 67
0
votes
1 answer

i can't pass and get the variable in scalate template

As suggested I'm asking new question in new topic. I have a problem with passing an argument to my scalate template (.ssp) Below my controller and my template @RequestMapping(value = "/", method = RequestMethod.GET) public ModelAndView home(Locale…
Fixus
  • 4,631
  • 10
  • 38
  • 67
0
votes
1 answer

How can I plug a strategy to deal with missing attributes when using Mustache templates

I'm using mustache to render stuff on the server, but also on the client. The strategy is that I have a single page app (rendered with mustache on the server) and this template pulls snippets from the server and uses them to render json on the…
iwein
  • 25,788
  • 10
  • 70
  • 111
0
votes
1 answer

Getting lift-scalate to accept .jade files

I am currently re-implementing some project using Lift. All the old views were done using jade for express.js, and I was glad to read that Scalate seems to be able to handle it as well. It's not as easy as it sounds, it seems. After adding the…
Lanbo
  • 15,118
  • 16
  • 70
  • 147
0
votes
2 answers

Scalate and GAE Options org.fusesource.scalate.TemplateException: Unable to create temporary file

I am trying to run Scala/Scalate on Google app engine. I wanted to test the project so i am running the GAE locally its deployed successfully and when i try to call the main url i am getting following exception…
Rajmahendra
  • 3,092
  • 3
  • 31
  • 42
0
votes
1 answer

"org.fusesource.scalate.TemplateException: loader constraint violation" when using SBTs embedded Jetty and scalatra/scalate

I started getting this error yesterday when using the embedded 'jetty-run' task in SBT. I reverted my code to a previous version and it's still happening. Note that I packaged up the application and deployed it in an actual jetty instance and I…
codefly
  • 640
  • 1
  • 5
  • 8
0
votes
2 answers

Is it possible to make Scalate templates that are like Apache Wicket templates?

Is it possible to make Scalate templates that are like Apache Wicket templates? If so, how? Are there any projects out there already doing this? If so, which?
adelarsq
  • 3,718
  • 4
  • 37
  • 47
0
votes
2 answers

How to load the modified classes which has been imported to scalate without jetty-restart?

I am using scalate as my view templates, and sbt + jrebel. But I found if the classes imported to scalate has been modified, we have to restart jetty, or there may be complication errors. The code is pretty simple: webapp/WEB-INF/web.xml
Freewind
  • 193,756
  • 157
  • 432
  • 708
0
votes
0 answers

Can IntelliJ IDEA offer proper Scala assistance with Scalate's flavor of Jade / Pug?

I have a lot of Jade templates that are created with Scalate. While you can tell IntelliJ to use its Pug plugin to parse them, it's not familiar with Scala code, which prevents it from giving much code help other than basic syntax highlighting (and…
jon_wu
  • 1,113
  • 11
  • 26
0
votes
2 answers

SBT multi module project: how to make static files (resources) available in main module?

I develop multi module SBT project. In general it's an akka api. It works well, when I run it locally and when I package it in docker. Recently I added a new one module for email templates generation. I decided to use scalate mustache for this…
Alex Fruzenshtein
  • 2,846
  • 6
  • 32
  • 53
0
votes
1 answer

Scalate's render tag is not able to resolve the template

Scalate's render tag is not able to resolve the template and throws the following exception: org.fusesource.scalate.util.ResourceNotFoundException: Could not load resource: [file:/Users/xxxxx/template/abc-conf.ssp] at…
0
votes
1 answer

how to specify a custom stylesheet in scalate ssp

How to specify a custom stylesheet (external) to a SSP template (Scala Server Pages) in Scalate? I tried specifying the html linking in the default.ssp file as follows.
itsraghz
  • 857
  • 1
  • 11
  • 25
0
votes
2 answers

Scala template engine for creating js files

I want to create js files using a template engine with Scala. Is it possible with the popular templating engines for Scala, namely Play and Scalate? If possible, than what are the pros and cons for using either of them?