Use of Freemarker interpolations in Nuxeo templates

Nuxeo 5.6 template files, including server.xml.nxftl, appear to use Freemarker interpolations in ways that violate the warning below extracted from this Freemarker document. If you agree, should I open a JIRA for this issue?


A frequent mistake of users is the usage of interpolations in places where it shouldn't/can't
be used. Interpolations work only in text sections (e.g. <h1>Hello ${name}!</h1>) and in
string literals (e.g. <#include "/footer/${company}.html">). A typical bad usage is 
<#if ${isBig}>Wow!</#if>, which is syntactically WRONG. You should simply write 
<#if isBig>Wow!</#if>. Also, <#if "${isBig}">Wow!</#if> is WRONG too, since the parameter
value will be a string, and the if directive wants a boolean value, so it will cause a 
runtime error.
0 votes

1 answers




You're right. I created NXP-10484 for that issue.


1 votes