Freemarker經常使用內建函數

例如:排序

1、?seq_index_of and ?seq_last_index_of 支持集合ast

一、seq_index_of 集合元素所處位置變量

    例如:<#assign array= ["A", "B", "C"]> ${array?seq_index_of("C")} 若是:=2date

二、seq_last_index_of 集合元素所處位置方法

    

  • 日期類型數據支持 ?long 方法im

  • 數值到日期的轉換 ?number_to_date, ?number_to_time, ?number_to_datetime數據

  • 日期格式轉換 ${myTimeStamp?iso_utc}datetime

  • 特殊變量 ${.now}sort

  • ?sort 和 ?sort_by 支持布爾值的排序集合

     

注:待完善。。。

相關文章
相關標籤/搜索