-
preface
...ons for Smarty, or you may find some help here in the forums and documentation. ...
...‚ Â Â Next Preface The Philosophy The Smarty design was largely driven b...
...igners quick and easy to maintain syntax easy to understand, no PHP knowledge ne...
... Preface Preface preface Preface Prev    Next Preface The Philosophy...
...ions on what type of logic can be injected into a template. Smarty insulates the...
...deployment for programmers and designers quick and easy to maintain syntax easy ...
...on: "Web designers have to learn a syntax anyways, why not PHP?" Of course web d...
...ing in PHP, there are basically two camps of thought. The first camp exclaims th...
...bility to learn PHP, it is about the consequences of mixing PHP with HTML. If de...
...by these goals: clean separation of presentation from application code PHP backe...
-
installing.smarty.basic
...y, if your application can find the Smarty.class.php file, you do not need to se...
...Basic Installation Install the Smarty library files which are in the /libs/ sub ...
... Basic Installation Basic Installation basic, installation Basic Installation Pr...
... Basic Installation Basic Installation basic, installation Basic Installation Pr...
...cally, if your application can find the Smarty.class.php file, you do not need t...
...red among all applications and only get changed when you upgrade to a new versio...
... Basic Installation Basic Installation basic, installation Basic Installation Pr...
... Basic Installation Basic Installation basic, installation Basic Installation Pr...
-
language.syntax.variables
...ed on presentation. If you find your template syntax getting too complex, it may...
...plate variables start with the $dollar sign. They can contain numbers, letters a...
...dollar sign. They can contain numbers, letters and underscores, much like a PHP ...
... Variables Variables variables Variables Prev  Chapter 3. Basic Syntax...
...ith the $dollar sign. They can contain numbers, letters and underscores, much li...
...n contain numbers, letters and underscores, much like a PHP variable . You can r...
...nce arrays by index numerically or non-numerically. Also reference object proper...
...x  Next Variables Template variables start with the $dollar sign. They can c...
-
language.syntax.quotes
...ed on presentation. If you find your template syntax getting too complex, it may...
..."double quotes" so long as the variable name contains only numbers, letters and ...
... Embedding Vars in Double Quotes Embedding Vars in Double Quotes embedding, vars...
... Embedding Vars in Double Quotes Embedding Vars in Double Quotes embedding, vars...
...`$module.contact`.tpl"} {* can use variable with dot syntax *} {include file="`$...
...ains only numbers, letters and under_scores. See naming for more detail. With an...
.... In addition Smarty3 does allow embedded Smarty tags in double quoted strings. ...
... of thumb to keep the template syntax minimal and focused on presentation. If yo...
-
language.syntax.attributes
...ed on presentation. If you find your template syntax getting too complex, it may...
... Next Attributes Most of the functions take attributes that specify or modify ...
... don't have to be enclosed in quotes, but it is required for literal strings. Va...
... Attributes Attributes attributes Attributes Prev  Chapter 3. Basic Sy...
...ould not be in quotes. You can even use PHP function results, plugin results and...
...odifiers may also be used, and should not be in quotes. You can even use PHP fun...
... Attributes Attributes attributes Attributes Prev  Chapter 3. Basic Sy...
-
api.register.default.plugin.handler
...ed if the compiler can not find a definition for a tag otherwise. It uses the fo...
...ndler which gets called if the compiler can not find a definition for a tag othe...
... registerDefaultPluginHandler() registerDefaultPluginHandler() registerdefaultpl...
... registerDefaultPluginHandler() registerDefaultPluginHandler() registerdefaultpl...
...ets called if the compiler can not find a definition for a tag otherwise. It use...
... registerDefaultPluginHandler() registerDefaultPluginHandler() registerdefaultpl...
...ter a function which gets called on undefined tags Description void register...
...the class. If during compilation Smarty encounters tag which is not defined inte...
-
troubleshooting
... an {if} tag. If you can't find the error, you might have to open the compiled P...
...ll see an error similar to the following: Example 20.1. Smarty errors Warn...
...pter 20. Troubleshooting Chapter 20. Troubleshooting chapter, 20, tr...
... Chapter 20. Troubleshooting Chapter 20. Troubleshooting chapter, 20...
...s Smarty/PHP errors Smarty can catch many errors such as missing tag attributes ...
...late name, the line number and the error. After that, the error consists of the ...
.... These types of errors usually end up in PHP compile-time parsing errors. Examp...
...lling smarty page for more about permissions. Fatal error: Smarty error: the $ca...
...rty/PHP errors Smarty can catch many errors such as missing tag attributes or ma...
-
plugins.block.functions
...unctions, it's possible to find out what the parent block function is by accessi...
...functions are functions of the form: {func} .. {/func} . In other words, they en...
... Chapter 18. Extending Smarty With Plugins  Next Block Functions voi...
...lock Functions Prev  Chapter 18. Extending Smarty With Plugins  Ne...
...he same name, that is, you cannot have both custom function {func} and block fun...
...y enclose a template block and operate on the contents of this block. Block func...
...unction implementation is called twice by Smarty: once for the opening tag, and ...
...$content ,   $template ,   $repeat ) ;  array $params ; mixe...
-
language.math
...ed on presentation. If you find your template syntax getting too complex, it may...
...good rule of thumb to keep the template syntax minimal and focused on presentati...
... keep the template syntax minimal and focused on presentation. If you find your ...
... Math Math math Math Prev  Chapter 3. Basic Syntax  Next Math Math...
...Syntax  Next Math Math can be applied directly to variable values. ExampleÂ...
... Note Although Smarty can handle some very complex expressions and syntax, it is...
... Math Math math Math Prev  Chapter 3. Basic Syntax  Next Math Math...
-
resources
...f the file resource cannot find the requested template, the $default_template_ha...
... Custom Template Resources The templates may come from a variety of sources. Whe...
...plates from any directory Windows Filepaths String Template Resources Stream Tem...
... Chapter 16. Resources Chapter 16. Resources chapter, 16, resources ...
...nged. If the file resource cannot find the requested template, the $default_temp...
...ed by the appropriate path and template name. If a resource is not explicitly gi...
... from $template_dir . This allows websites employing multiple sets of templates ...
...able of Contents File Template Resources Templates from $template_dir Templates ...