Date of release: 2006-06-23
This release, compared to 2.3.7 RC1, contains new operators for
handling null/missing variables, , the
built-in, and some more bugfixes. Note that 2.3.7 RC1 has a long
change log, so you may want to read
Changes on the Java side
seq_containsbuilt-in now handles
TemplateCollectionModel-s as well.
Bug fixed: In 2.3.7 RC1
FreemarkerServlethas always died with
Changes on the FTL side
3 new operators were added for terser missing variable handling. These operators make the
if_existsbuilt-ins deprecated. (The parser doesn't issue any warning messages when you use deprecated built-ins, and they are still working.):
exp1!exp2is near equivalent with
(exp1)!exp2is near equivalent with
(exp1)?default(exp2). The only difference is that this new operator doesn't evaluate the
exp2when the default value is not needed.
exp1!is similar to
(exp1)!is similar to
(exp1)?if_exists. The difference is that with this new operator the default value is an empty string and an empty list and empty hash at the same time (multi-type variable), while with
if_existsthe default value was an empty string and an empty list and empty hash and boolean
falseand a transform that does nothing and ignores all parameters at the same time.
exp1??is equivalent with
(exp1)??is equivalent with with
exp?substring(from, toExclusive), also callable as
exp?substring(from). Getting substrings was possible for a long time like
myString?substring(from)has the advantage that it has an exclusive end, which is more practical. (Edit: Since 2.3.21 ranges are the preferred way again, as it has
myString[from..<toExclusive].) Sequence (list) slices still has to be get with the old syntax, since
substringonly applies to strings. Please note that the ``to'' parameter is 1 greater with this new builtin, as it is an exclusive index. Further difference is that the
substringbuilt-in requires that the ``from'' index is less than or equal to the ``to'' index. So 0 length substrings are possible now, but not reversed substrings.
Bug fixed:  malfunction when the
recoverdirective has no nested content