Smarty - компилирующий обработчик шаблонов

Monte Ohrt <monte@ispi.net>
Andrei Zmievski <andrei@php.net>
Sergei Suslenkov <student@bsuir-fcd.org>

21-05-2004

Оригинал: smarty.php.net


Содержание
Предисловие
I. Приступая к работе
1. Что такое Smarty?
2. Инсталяция
Требования
Базовая инсталяция
Extended Setup
II. Smarty для дизайнеров шаблонов
3. Базовый синтаксис
Комментарии
Функции
Параметры
Внедренные переменные в двойных кавычках
4. Переменные
Переменные, установленные в PHP
Переменные файлов конфигурации
Зарезервированная переменная {$smarty}
5. Модификаторы переменных
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. Комбинирование модификаторов
7. Встроенные функции
capture
config_load
foreach,foreachelse
include
include_php
insert
if,elseif,else
ldelim,rdelim
literal
php
section,sectionelse
strip
8. Пользовательские Функции
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. Конфигурационные файлы
10. Отладочная консоль
III. Smarty для программистов
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. Приложения
17. Troubleshooting
Smarty/PHP errors
18. Советы
Обработка пустых переменных
Обработка переменных по умлочанию
Присвоение переменной заголовка (title) заголовку шаблона.
Даты
WAP/WML
Составные шаблоны
Obfuscating E-mail Addresses
19. Источники
20. Ошибки