每个Smarty的标签都可以是显示一个
变量或者调用
某种类型的函数。
调用和显示的方式是在定界符内包含了函数,和其
属性,
如:{funcname attr1="val1" attr2="val2"}.
Example 3.3. 函数语法
{config_load file="colors.conf"}
{include file="header.tpl"}
{insert file="banner_ads.tpl" title="My Site"}
{if $logged_in}
Welcome, <span style="color:{#fontColor#}">{$name}!</span>
{else}
hi, {$name}
{/if}
{include file="footer.tpl"}