Add Values to a Sequence?
You have to create a new sequence by concatenating x and a sequence containing only the new element: <#assign x = x + [ “green” ] />
You have to create a new sequence by concatenating x and a sequence containing only the new element: <#assign x = x + [ “green” ] />
this is what ended up working for me: freemarkerConfiguration = new Configuration(Configuration.VERSION_2_3_28); freemarkerConfiguration.setClassForTemplateLoading(this.getClass(), “https://stackoverflow.com/”); Template freemarkerTemplate = freemarkerConfiguration.getTemplate(“email/vendor.tpl”);
?? tells if the left hand operand’s value is missing (means it’s Java null or you have an undefined variable there), and gives back false (missing) or true (not missing) accordingly. ?has_content is very much like ??, except it also returns false for a 0-length string or empty FTL sequence (like java.util.List, Java array, etc.) … Read more
Freemarker template files I believe. http://freemarker.org/
Starting from freemarker 2.3.7, you can use this syntax : ${(object.attribute)!} or, if you want display a default text when the attribute is null : ${(object.attribute)!”default text”}