Greater than comparison in Freemarker tags
In Freemarker we can test the lesser than condition directly .
But we can't do the same for greater than (>) in freemarker tag like
The above one is wrong because the first occurrence of > sign will close the <#if condition. so for this we need to use either one of the following methods
<#if value1 < valu2>
value1 is less than value2
</#if>
But we can't do the same for greater than (>) in freemarker tag like
//Wrong method
<#if value1 > valu2>
value1 is greater than value2
</#if>
The above one is wrong because the first occurrence of > sign will close the <#if condition. so for this we need to use either one of the following methods
Correct Method 1:
<#if (value1 > value2)>
value1 is greater than value2
</#if>
Correct Method 2:
<#if value1 > value2>
value1 is greater than value2
</#if>
2 comments:
Your post has saved me. Thank you!
Post a Comment