?
Dieses Dokument verwendet PHP-Handbuch für chinesische Websites Freigeben
Each Smarty tag either prints a variable or invokes some sort of function. Functions are processed and displayed by enclosing the function and its attributes into delimiters like so: {funcname attr1="val" attr2="val"}.
每一個smarty標簽輸出一個變量或者調(diào)用某種函數(shù).
在定界符內(nèi) 函數(shù)(用'{'包?。┖推鋵傩裕ㄓ媒绶。⒈惶幚砗洼敵?例如:
{funcname attr1="val" attr2="val"}.
Example 3-2. function syntax 例 3-2.函數(shù)語法
|
Both built-in functions and custom functions have the same syntax in the templates. Built-in functions are the inner workings of Smarty, such as {if} , {section} and {strip} . They cannot be modified. Custom functions are additional functions implemented via plugins. They can be modified to your liking, or you can add new ones. {html_options} and {html_select_date} are examples of custom functions.
在模板里無論是內(nèi)建函數(shù)還是自定義函數(shù)都有相同的語法.
內(nèi)建函數(shù)將在smarty內(nèi)部工作,例如
{if}
,
{section}
and
{strip}
.他們不能被修改.
自定義函數(shù)通過插件機制起作用,它們是附加函數(shù). 只要你喜歡,可以隨意修改.你也可以自行添加.
例如
{html_options}
和
{html_select_date}
--------------------------------------------------------------------------------
?