每一個smarty標(biāo)簽輸出一個變量或者調(diào)用某種函數(shù).
在定界符內(nèi) 函數(shù)(用'{'包住)和其屬性(用界符包住)將被處理和輸出.例如:
{funcname attr1="val" attr2="val"}.
例 3-2.函數(shù)語法
|
在模板里無論是內(nèi)建函數(shù)還是自定義函數(shù)都有相同的語法.
內(nèi)建函數(shù)將在smarty內(nèi)部工作,例如 {if} , {section} and {strip} .他們不能被修改.
自定義函數(shù)通過插件機制起作用,它們是附加函數(shù). 只要你喜歡,可以隨意修改.你也可以自行添加.
例如 {html_options} 和 {html_select_date}