Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty


Part III. Smarty For Programmers

Table of Contents

11. Constants
12. Smarty Class Variables
13. Smarty Class Methods()
append() — append an element to an assigned array
append_by_ref() — append values by reference
assign() — assign values to the templates
assign_by_ref() — assign values by reference
clear_all_assign() — clears the values of all assigned variables
clear_all_cache() — clears the entire template cache
clear_assign() — clears the value of an assigned variable
clear_cache() — clears the cache for a specific template
clear_compiled_tpl() — clears the compiled version of the specified template resource
clear_config() — clears assigned config variables
config_load() — loads config file data and assigns it to the template
display() — displays the template
fetch() — returns the template output
get_config_vars() — returns the given loaded config variable value
get_registered_object() — returns a reference to a registered object
get_template_vars() — returns assigned variable value(s)
is_cached() — returns true if there is a valid cache for this template
load_filter() — load a filter plugin
register_block() — dynamically register block functions plugins
register_compiler_function() — dynamically register a compiler function plugin
register_function() — dynamically register template function plugins
register_modifier() — dynamically register modifier plugin
register_object() — register an object for use in the templates
register_outputfilter() — dynamically register outputfilters
register_postfilter() — dynamically register postfilters
register_prefilter() — dynamically register prefilters
register_resource() — dynamically register resources
trigger_error() — output an error message
template_exists() — checks whether the specified template exists
unregister_block() — dynamically unregister block function plugins
unregister_compiler_function() — dynamically unregister a compiler function
unregister_function — dynamically unregister template function plugin
unregister_modifier() — dynamically unregister modifier plugin
unregister_object() — dynamically unregister an object
unregister_outputfilter() — dynamically unregister an output filter
unregister_postfilter() — dynamically unregister a postfilter
unregister_prefilter() — dynamically unregister a prefilter
unregister_resource() — dynamically unregister a resource plugin
14. Caching
Setting Up Caching
Multiple Caches Per Page
Cache Groups
Controlling Cacheability of Plugins' Output
15. Advanced Features
Output Filters
Cache Handler Function
Templates from $template_dir
Templates from any directory
Templates from other sources
Default template handler function
16. Extending Smarty With Plugins
How Plugins Work
Naming Conventions
Writing Plugins
Template Functions
Block Functions
Compiler Functions
Output Filters