Reputation: 18875
I am wondering how to assess two conditions in an <#if> statement in FreeMarker Template ? for example, in pseudo code:
if (i < 10 && i > 2)
do something;
how to use two conditions in Freemarker? thanks
Upvotes: 9
Views: 21576
Reputation: 31112
The tricky part in that expression is that the >
operator ends the FTL tag. To work that around, you can write <#if i < 10 && (i > 2)>
or <#if i < 10 && 2 < i>
or <#if i < 10 && i > 2>
.
Upvotes: 26