2

I want to use Javascript's ES6 template literal syntax in a Freemarker template. Referring to variables in template literals usually have a syntax of ${name}.

However the syntax in Freemarker is remarkably similar and uses the same syntax to define variables. As a result, when the Freemarker template is parsed, it interprets ${name} as a freemarker variable and not a Javascript variable, rendering it undefined, thus erroring out.

Does anyone know how one might use ES6 template literal syntax within a Freemarker template?

Phillip Chan
  • 993
  • 7
  • 17

0 Answers0