freemarker 判断list记录大于0

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

<#if (post.attachments?size > 0)>
     


      
       
        
       
      
     

          相关附件:
          <#list post.attachments as attach>
           链接:${attach.realFilename} 
           大小:${attach.filesize} 描述:${attach.description} 上传日期:${attach.uploadDate}
          

         
        

     

你可能感兴趣的:(web页面)