Smarty - the compiling PHP template engine
Smarty - php 模板编译引擎
Monte Ohrt <monte@ispi.net>
Andrei Zmievski <andrei@php.net>
Copyright © 2001, 2002 by ispi of Lincoln, Inc.
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 Up 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
错误报告
Next
Preface