Smarty 手册


Table of Contents目录列表
Preface
I. Getting Started入门
1. What is Smarty?什么是Smarty?
2. Installation安装
Requirements安装需求
Basic Installation基本安装
Extended Setup扩展类设定
II. Smarty For Template Designers模板设计者篇
3. Basic Syntax基本语法
Comments注释
Functions函数
Attributes(函数)属性
4. Variables变量
Variables assigned from PHP由PHP分配的变量
Variables loaded from config files从config文件读取的变量
{$smarty} reserved variable{$smarty}保留变量
5. Variable Modifiers变量调节器
capitalize首字大写
count_characters计算字符数
cat连接字符串
count_paragraphs计算段落数
count_sentences计算句数
count_words计算词数
date_format日期格式化
default默认
escape转码
indent缩进
lower小写
nl2br换行符替换成<br />
regex_replace[正则替换]
replace替换
spacify插空
string_format字符串格式化
strip去除(多余空格)
strip_tags去除html标签
truncate截取
upper大写
wordwrap行宽约束
6. Combining Modifiers组合使用调节器
7. Built-in Functions内建函数
capture
config_load
foreach,foreachelse
include
include_php
insert
if,elseif,else
ldelim,rdelim
literal
php
section,sectionelse
strip
8. Custom Functions常规函数
assign
counter
cycle
debug
eval
fetch
html_checkboxes
html_image
html_options
html_radios
html_select_date
html_select_time
html_table
math
mailto
popup_init
popup
textformat
9. Config Files
10. Debugging Console
III. Smarty For Programmers程序员篇
11. Constants常量
SMARTY_DIR
12. Variables变量
$template_dir
$compile_dir
$config_dir
$plugins_dir
$debugging
$debug_tpl
$debugging_ctrl
$global_assign
$undefined
$autoload_filters
$compile_check
$force_compile
$caching
$cache_dir
$cache_lifetime
$cache_handler_func
$cache_modified_check
$config_overwrite
$config_booleanize
$config_read_hidden
$config_fix_newlines
$default_template_handler_func
$php_handling
$security
$secure_dir
$security_settings
$trusted_dir
$left_delimiter
$right_delimiter
$compiler_class
$request_vars_order
$compile_id
$use_sub_dirs
$default_modifiers
13. Methods方法
append
append_by_ref
assign
assign_by_ref
clear_all_assign
clear_all_cache
clear_assign
clear_cache
clear_compiled_tpl
clear_config
config_load
display
fetch
get_config_vars
get_registered_object
get_template_vars
is_cached
load_filter
register_block
register_compiler_function
register_function
register_modifier
register_object
register_outputfilter
register_postfilter
register_prefilter
register_resource
trigger_error
template_exists
unregister_block
unregister_compiler_function
unregister_function
unregister_modifier
unregister_object
unregister_outputfilter
unregister_postfilter
unregister_prefilter
unregister_resource
14. Caching缓存
Setting 向上一级 Caching建立缓存
Multiple Caches Per Page
Cache Groups缓存集合
15. Advanced Features高级特点
Objects对象
Prefilters预过滤器
Postfilters后过滤器
Output Filters输出滤镜
Cache Handler Function缓存处理函数
Resources资源
16. Extending Smarty With Plugins使用插件扩展Smarty
How Plugins Work插件怎样工作
Naming Conventions命名约定
Writing Plugins编写插件
Template Functions模板函数
Modifiers调节器
Block Functions区块函数
Compiler Functions编译函数
Prefilters/Postfilters预过滤/后过滤
Output Filters输出滤镜
Resources资源
Inserts嵌入
IV. Appendixes附录
17. Troubleshooting疑难解答
Smarty/PHP errors
18. Tips & Tricks使用技巧和经验
Blank Variable Handling空白变量处理
Default Variable Handling默认变量处理
Passing variable title to header template
Dates
WAP/WML
Componentized Templates
Obfuscating E-mail Addresses
19. Resources
20. BUGS错误报告