Smarty屬性


Attributes

[屬性]

大多數函式都帶有自己的屬性以便於明確說明或者修改他們的行為. 
smarty函式的屬性很像HTML中的屬性. 
靜態數值不需要加引號,但是字串建議使用引號. 
如果用變數作屬性,它們也不能加引號.

一些屬性用到了布林值(真或假).
它們不需要加引號,可以是true,on,yes或者false,off,no.


例 3-3.函式屬性語法

{include file="header.tpl"}

{include file=$includeFile}

{include file=#includeFile#}

{html_select_date display_days=yes}

<SELECT name=company>
{html_options values=$vals selected=$selected output=$output}
</SELECT>