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
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>.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With