PEAR News | PHP News | Manuals | Imprint

Manuals :: Smarty - the compiling PHP template engine

Smarty - the compiling PHP template engine

Monte Ohrt <monte@ispi.net>
Andrei Zmievski <andrei@php.net>

Table of Contents
Preface
I. Getting Started
1. What is Smarty?
2. Installation
Requirements
Basic Installation
Extended Setup
II. Smarty For Template Designers
3. Basic Syntax
Comments
Functions
Attributes
Embedding Vars in Double Quotes
4. Variables
Variables assigned from PHP
Variables loaded from config files
{$smarty} reserved variable
5. Variable Modifiers
capitalize
count_characters
cat
count_paragraphs
count_sentences
count_words
date_format
default
escape
indent
lower
nl2br
regex_replace
replace
spacify
string_format
strip
strip_tags
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
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
© 2004 I.S.U.M.