Part II. 模板设计师篇

Table of Contents

3. 基本语法
Comments
变量
函数
属性
双引号中嵌入变量
数学计算
避免Smarty解析
4. 变量
从PHP赋值的变量
数组赋值
数组下标
对象
变量作用范围
从配置文件获取的变量
{$smarty} 保留变量
页面请求变量
{$smarty.now}
{$smarty.const}
{$smarty.capture}
{$smarty.config}
{$smarty.section}
{$smarty.template}
{$smarty.template_object}
{$smarty.current_dir}
{$smarty.version}
{$smarty.block.child}
{$smarty.block.parent}
{$smarty.ldelim}, {$smarty.rdelim}
5. 变量修饰器
capitalize
cat
count_characters
count_paragraphs
count_sentences
count_words
date_format
default
escape
from_charset
indent
lower
nl2br
regex_replace
replace
spacify
string_format
strip
strip_tags
to_charset
truncate
unescape
upper
wordwrap
6. 复合修饰器
7. 内置函数
{$var=...}
{append}
{assign}
{block}
{call}
{capture}
{config_load}
{debug}
{extends}
{for}
{foreach},{foreachelse}
@index
@iteration
@first
@last
@show
@total
{break}
{continue}
{function}
{if},{elseif},{else}
{include}
{include_php}
{insert}
{ldelim},{rdelim}
{literal}
{nocache}
{php}
{section},{sectionelse}
.index
.index_prev
.index_next
.iteration
.first
.last
.rownum
.loop
.show
.total
{setfilter}
{strip}
{while}
8. 自定义函数
{counter}
{cycle}
{eval}
{fetch}
{html_checkboxes}
{html_image}
{html_options}
{html_radios}
{html_select_date}
{html_select_time}
{html_table}
{mailto}
{math}
{textformat}
9. 配置文件
10. 调试控制台