As of FreeMarker 2.3.23 you can write a?then('a.htm', 'b.htm')
. The advantage of condition?then(whenTrue, whenFalse)
over condition?string(whenTrue, whenFalse)
is that it works for non-string whenTrue
and whenFalse
, and that it only evaluates one of whenTrue
and whenFalse
expressions (whichever branch is chosen).