<li class="<#if (position.flag)! =='haha1'>hide<#else >show</#if>"><a href=" ">按钮name</a></li>
    <li class="<#if (position.flag)! =='haha1'>hide</#if>"><a href=" ">按钮name</a></li>

    boolean 判断: class="${(obj.isShow||obj.isShow!=null)?string('disable','enable')} show"  //默认false(class="show")   //http://jxdwuao.iteye.com/blog/1037462

 <#if qqList??> : 判断这个变量是否存在;

freemarker 判断list记录大于0:

 

     freemarker 判断list记录大于0 用<#if (list?size > 0)></#if>即可。下面是个显示附件的实例
    <#if (post.attachments?has_content)>
    <#if post.attachments?size gt 0>
    <#if (post.attachments?size > 0)> 
    <#else> 
    </#if>

 

布尔类型判断(已自测!):

  <section  data-need="${(userListItem.isAdmin)?string('true','false')}">

 

相关文章:

  • 2022-12-23
  • 2021-11-25
  • 2022-12-23
  • 2021-12-06
  • 2021-04-24
  • 2021-08-07
  • 2021-05-20
  • 2021-10-06
猜你喜欢
  • 2022-12-23
  • 2022-01-30
  • 2021-09-10
  • 2022-02-16
  • 2022-01-09
  • 2022-12-23
  • 2021-11-05
相关资源
相似解决方案