freemarker if elseif

 FreeMarker模板 if, else, elseif 指令 :

if, else, elseif 
语法 
<#if condition> 
  ... 
<#elseif condition2> 
  ... 
<#elseif condition3> 
  ... 
... 
<#else> 
  ... 
</#if> 
用例 
<#if x = 1> 
  x is 1 
</#if> 

<#if x = 1> 
  x is 1 
<#else> 
  x is not 1 
</#if> 
原文地址:https://www.cnblogs.com/ltflike/p/3968561.html