I just want to do something like this:
<a href="${ a? 'a.htm' : 'b.htm'}">
If you're using freemarker 2.3.23 or newer, you can use the then
built-in:
<a href="${a?then('a.htm','b.html')}" target="${openTarget}">
If you're using an older version of freemarker, you can use instead the string
built-in:
<a href="${a?string('a.htm','b.html')}" target="${openTarget}">
When applied to a boolean, the string
built-in will act as a ternary operator.