Smarty PHP Template Programming and Applications
  FREE ONLINE EDITION: Read full chapters online, download free samples from the book and more...
  Index > Chapter 8
Book Contents

Preface
Chapter 1: Introduction to Smarty
Chapter 2: Smarty Site Architecture
Chapter 3: What Designers Need to Know
Chapter 4: Creating a Template
Chapter 5: Advanced Templating
Chapter 6: Smarty Functions
Chapter 7: Debugging for Designers
Chapter 8: Built-in Smarty Variables and Methods
Chapter 9: Caching and Performance
Chapter 10: Extending Smarty with Plug-ins
Chapter 11: Filters
Chapter 12: Internationalization

Index

Free Content
Chapter 6: Smarty Functions[345 KB PDF]

Code Download

Download
Smarty Cheat Sheet


Download PDF Version [285 KB]

Download GIF Version [304 KB]
 

 

 

Chapter 8: Built-in Smarty Variables and Methods

In order to understand Smarty variables and methods, let's first look at the Smarty library. Being a programmer probably makes you wonder how the Smarty library was built. If we look in the Smarty libs folder we can see four files: Config_File.class.php, debug.tpl, Smarty.class.php, and Smarty_Compiler.class.php.

  • Chapter 8: Built-in Smarty Variables and Methods
    • Built-in Smarty Variables
      • $template_dir
      • $compile_dir
      • $config_dir
      • $plugins_dir
      • $debugging
      • $error_reporting
      • $debug_tpl
      • $debugging_ctrl
      • $compile_check
      • $force_compile
      • $caching
      • $cache_dir
      • $cache_lifetime
      • $cache_modified_check
      • $php_handling
      • $security
      • $secure_dir
      • $security_settings
      • $trusted_dir
      • $left_delimiter
      • $right_delimiter
      • $request_vars_order
      • $request_use_auto_globals
      • $compile_id
      • $use_sub_dirs
      • $default_modifiers
      • $default_resource_type
      • $cache_handler_func
      • $autoload_filters
      • $config_overwrite
      • $config_booleanize
      • $config_read_hidden
      • $config_fix_newlines
      • $default_template_handler_func
      • $compiler_file
      • $compiler_class
      • $config_class
    • Handy Built-in Smarty Variables Table
    • Built-in Smarty Methods
      • assign
      • assign_by_ref
      • Example: Working of assign and assign_by_ref
      • append
      • append_by_ref
      • clear_assign
      • register_function
      • unregister_function
      • register_object
      • unregister_object
      • register_block
      • unregister_block
      • register_compiler_function
      • unregister_compiler_function
      • register_modifier
      • unregister_modifier
      • register_resource
      • unregister_resource
      • register_prefilter
      • unregister_prefilter
      • register_postfilter
      • unregister_postfilter
      • register_outputfilter
      • unregister_outputfilter
      • load_filter
      • clear_cache
      • clear_all_cache
      • is_cached
      • clear_all_assign
      • clear_compiled_tpl
      • template_exists
      • get_template_vars
      • get_config_vars
      • trigger_error
      • display
      • fetch
      • config_load
      • get_registered_object
      • clear_config
    • Summary

 

 

 

 

 

Paperback 250 pages
Released: April 2006
ISBN: 190481140X



eBook Version Also Available
Buy the book & eBook together and get 80% off the eBook

 

 

     

 




View the book details
on PacktPub.com

 


 

  This website is owned and maintained by Packt Publishing Ltd, 2006. All rights reserved. Terms and Conditions