Smarty注释代码

所有的smarty模板标签都被加上了定界符.
默认情况下是 { 和},但它们是可被改变的.

例如,我们假定你在使用默认定界符.
smarty里,所有定界符以外的内容都是静态输出的,或者称之为不可改变.
当smarty遇到了模板标签,将尝试解释他们,然后再以恰当的方式输出 .

Comments[注释]

模板注释被*号包围,例如 {* this is a comment *} 
smarty注释不会在模板文件的最后输出中出现.
它只是模板内在的注释.

 

例 3-1.注释

 
{* Smarty *}

{* include the header file here *}
{include file="header.tpl"}

{include file=$includeFile}

{include file=#includeFile#}

{* display dropdown lists *}
<SELECT name=company>
{html_options values=$vals selected=$selected output=$output}
</SELECT>
posted @ 2015-02-22 14:44  单方面  阅读(174)  评论(0编辑  收藏  举报