-
api.template.exists
... templateExists() templateExists() templateexists, templateExists() Prev  Ch...
-
api.create.template
... createTemplate() createTemplate() createtemplate, createTemplate() Prev  Ch...
-
advanced.features.template.inheritance
... Template Inheritance Template Inheritance template, inheritance Template Inheri...
-
api.set.template.dir
... setTemplateDir() setTemplateDir() settemplatedir, setTemplateDir() Prev  Ch...
-
variable.template.dir
... $template_dir $template_dir , template_dir $template_dir Prev  Chapter 1...
-
advanced.features.template.settings
... Changing settings by template Changing settings by template changing, settings,...
-
api.get.template.vars
... getTemplateVars() getTemplateVars() gettemplatevars, getTemplateVars() Prev Â...
-
variable.debug_template
...pl This is the name of the template file used for the debugging console. By defa...
-
api.get.template.dir
... getTemplateDir() getTemplateDir() gettemplatedir, getTemplateDir() Prev  Ch...
-
tips.componentized.templates
... Componentized Templates Componentized Templates componentized, templates Compon...
-
api.compile.all.templates
... compileAllTemplates() compileAllTemplates() compilealltemplates, compileAllTemp...
-
variable.default.template.handler.func
... $default_template_handler_func $default_template_handler_func , default_templat...
-
api.add.template.dir
... addTemplateDir() addTemplateDir() addtemplatedir, addTemplateDir() Prev  Ch...
-
language.function.html.select.time
...seconds in the morning the template above would output: select name="Time_Hour" ...
-
language.modifiers
... Part II. Smarty For Template Designers  Next Chapter 5. Variabl...
-
advanced.features.streams
...oo://bar stream to get the template variable. Example 17.8. Stream Variabl...
-
installing.smarty.basic
...which are by default named templates/ , templates_c/ , configs/ and cache/ Each ...
-
tips.dates
...s timestamps . This allows template designers to use the date_format modifier fo...
-
variable.cache.lifetime
... of time in seconds that a template cache is valid. Once this time has expired, ...
-
plugins.outputfilters
...ilter plugins operate on a template's output, after the template is loaded and e...
-
api.get.tags
...€” return tags used by template Description string getTags ( object ...
-
api.unregister.plugin
...ugin ?php // we don't want template designers to have access to function plugin ...
-
language.function.php
...embedded directly into the template. They will not be escaped, regardless of the...
-
language.modifier.truncate
...eckout Counter.'); ? where template is: {$articleTitle} {$articleTitle|truncate}...
-
variable.cache.dir
...ame of the directory where template caches are stored. By default this is ./cach...
-
language.function.append
... for creating or appending template variable arrays during the execution of a te...
-
language.modifier.spacify
...h, Experts Say.'); ? Where template is: {$articleTitle} {$articleTitle|spacify} ...
-
language.variables.smarty
...cation code structure with templates. A good practice is to assign specific need...
-
language.modifier.count.sentences
...rmer with Axe.' ); ? Where template is: {$articleTitle} {$articleTitle|count_sen...
-
smarty.for.designers
... Part II. Smarty For Template Designers Part II. Smarty For Template...
-
language.function.strip
... your tags together in the template to get the desired results. This usually end...
-
language.syntax.variables
...Syntax  Next Variables Template variables start with the $dollar sign. They ...
-
api.assign.by.ref
... to assign() values to the templates by reference. Technical Note With the intro...
-
language.function.html.select.date
....16. {html_select_date} Template code {html_select_date} This will output: se...
-
language.variable.scopes
...ed with createData() , and template objects created with createTemplate() . Thes...
-
variable.escape.html
...ml to TRUE will escape all template variable output by wrapping it in htmlspecia...
-
language.escaping
...avascript or CSS code in a template. The problem arises as those languages use t...
-
language.function.nocache
...ed to disable caching of a template section. Every {nocache} must be paired with...
-
variable.config.read.hidden
...fig files can be read from templates. Typically you would leave this FALSE , tha...
-
api.append.by.ref
... to append() values to the templates by reference. Technical Note With the intro...
-
language.modifier.regex.replace
...n, experts say."); ? Where template is: {* replace each carriage return, tab and...
-
caching
... of Output Cacheability of Template Section Cacheability of Tags Cacheability of...
-
language.modifier.replace
... Use in Garden."); ? Where template is: {$articleTitle} {$articleTitle|replace:'...
-
variable.default.modifiers
...ply to every variable in a template. For example, to HTML-escape every variable ...
-
language.syntax.quotes
... rule of thumb to keep the template syntax minimal and focused on presentation. ...
-
language.custom.functions
... Part II. Smarty For Template Designers  Next Chapter 8. Custom ...
-
language.syntax.attributes
... rule of thumb to keep the template syntax minimal and focused on presentation. ...
-
api.register.default.plugin.handler
...) * @param Smarty_Internal_Template $template template object * @param string $c...
-
language.modifier.lower
...ose, Jury Hung.'); ? Where template is: {$articleTitle} {$articleTitle|lower} Th...
-
language.function.config.load
...onfiguration file into the template. Attributes: Attribute Name Type Required De...
-
language.function.textformat
...y assign string No n/a The template variable the output will be assigned to Exam...
-
language.function.eval
...o evaluate a variable as a template. This can be used for things like embedding ...
-
api.is.cached
... is a valid cache for this template Description bool isCached ( string t...
-
language.basic.syntax
... Part II. Smarty For Template Designers  Next Chapter 3. Basic S...
-
language.builtin.functions
... Part II. Smarty For Template Designers  Next Chapter 7. Built-i...
-
advanced.features
...urity Changing settings by template Template Inheritance Streams Objects Static ...
-
language.function.html.table
...te. Each example shows the template followed by output. {**** Example One ****} ...
-
resources.string
... String Template Resources String Template Resources string, template, resources...
-
plugins
...onventions Writing Plugins Template Functions Modifiers Block Functions Compiler...
-
language.function.foreach
...ssign('myColors', $arr); ? Template to output $myColors in an un-ordered list ul...
-
plugins.prefilters.postfilters
...ame ( $source , Â Â $template ) ; Â string $source ; object $template ;...
-
caching.custom
...fier * @param string $name template name * @param string $cache_id cache id * @p...
-
tips
...g variable title to header template Dates WAP/WML Componentized Templates Obfusc...
-
language.function.html.checkboxes
...stomer_id', 1001); ? where template is {html_checkboxes name='id' values=$cust_i...
-
chapter.debugging.console
... Part II. Smarty For Template Designers  Next Chapter 10. Debugg...
-
api.get.config.vars
... ?php // get loaded config template var #foo# $myVar = $smarty- getConfigVars('f...
-
language.function.extends
...ds} tags are used in child templates in template inheritance for extending paren...
-
variable.config.booleanize
... can use the values in the template like so: {if #foobar#}...{/if} . If foobar w...
-
api.config.load
...data and assigns it to the template Description void configLoad ( string ...
-
troubleshooting
... 1041 Smarty shows you the template name, the line number and the error. After t...
-
language.function.html.image
...nd width. If you don't use template caching , it is generally better to avoid {h...
-
api.functions
...here plugins are stored addTemplateDir() — add a directory to the list of...
-
plugins.block.functions
... $content ,   $template ,   $repeat ) ;  array $params ;...
-
variable.php.handling
...e PHP code embedded in the templates. There are four possible settings, the defa...
-
language.combining.modifiers
... Part II. Smarty For Template Designers  Next Chapter 6. Combini...
-
preface
...n code PHP backend, Smarty template frontend compliment PHP, not replace it fast...
-
tips.default.var.handling
...frequently throughout your templates, applying the default modifier every time i...
-
plugins.writing
...y $params, Smarty_Internal_Template $template) { // load plugin depended upon $t...
-
language.math
... rule of thumb to keep the template syntax minimal and focused on presentation. ...
-
tips.passing.vars
...g variable title to header template Passing variable title to header template pa...
-
advanced.features.static.classes
...tion, and also complicates template syntax. It is recommended to register plugin...
-
variable.caching
...to cache the output of the templates to the $cache_dir . By default this is set ...
-
advanced.features.outputfilters
...xt Output Filters When the template is invoked via display() or fetch() , its ou...
-
plugins.inserts
...ed by {insert} tags in the template. string smarty_insert_name ( $params , Â ...
-
smarty.for.programmers
...Class Variables $allow_php_templates $auto_literal $autoload_filters $cache_dir ...
-
language.modifier.upper
...y Last a While."); ? Where template is: {$articleTitle} {$articleTitle|upper} Wi...
-
variable.right.delimiter
...ight delimiter used by the template language. Default is } . See also $left_deli...
-
plugins.resources
...a generic way of providing template sources or PHP script components to Smarty. ...
-
appendixes
...g variable title to header template Dates WAP/WML Componentized Templates Obfusc...
-
language.modifier.wordwrap
...seen in years." ); ? Where template is {$articleTitle} {$articleTitle|wordwrap:3...
-
language.function.block
... to define a named area of template source for template inheritance. For details...
-
language.modifier.strip
...ou want to strip blocks of template text, use the built-in {strip} function. Exa...
-
variable.autoload.filters
... you wish to load on every template invocation, you can specify them using this ...
-
caching.cacheable
...the cache. Cacheability of Template Section A larger section of your template ca...
-
what.is.smarty
...hat is Smarty? Smarty is a template engine for PHP. More specifically, it facili...
-
caching.groups
...c/foo/' . If you specify a template name such as clearCache('foo.tpl','a|b|c') t...
-
api.assign
...n variables/objects to the templates Description void assign ( mixed var...
-
language.function.if
...few added features for the template engine. Every {if} must be paired with a mat...
-
language.variables
... Part II. Smarty For Template Designers  Next Chapter 4. Variabl...
-
advanced.features.postfilters
...ures  Next Postfilters Template postfilters are PHP functions that your temp...
-
api.set.cache.dir
...rectory where the rendered template's output is stored Description Smarty se...
-
language.function.setfilter
...g allows the definition of template instance's variable filters. SYNTAX: {setfil...
-
language.modifier.unescape
...These are example unescape template lines followed by the output {$articleTitle}...
-
tips.obfuscating.email
...ple 21.8. Example of template the Obfuscating an email address div id="con...
-
language.modifier.escape
...? These are example escape template lines followed by the output {$articleTitle}...
-
api.fetch
...tch() — returns the template output Description string fetch ( string...
-
resources.extends
... Extends Template Resources Extends Template Resources extends, template, resour...
-
api.register.filter
...er filters to operate on a templates. It uses the following parameters: type def...
-
variable.debugging
...nforms you of the included templates, variables assigned from php and config fil...
-
api.display
...ay() — displays the template Description void display ( string te...
-
language.function.assign
...ign} is used for assigning template variables during the execution of a template...
-
language.function.literal
...} would interfere with the template delimiter syntax. Anything within {literal}{...
-
language.function.html.radios
...stomer_id', 1001); ? Where template is: {html_radios name='id' values=$cust_ids ...
-
resources.custom
... Custom Template Resources Custom Template Resources custom, template, resources...
-
config.files
... Part II. Smarty For Template Designers  Next Chapter 9. Config ...
-
api.register.object
...r an object for use in the templates Description void registerObject ( strin...
-
language.config.variables
..." rowBgColor = "#cccccc" A template demonstrating the #hash# method: {config_loa...
-
plugins.compiler.functions
... during compilation of the template. They are useful for injecting PHP code or t...
-
api.get.cache.dir
...rectory where the rendered template's output is stored Description string ge...
-
api.unregister.resource
...lso registerResource() and template resources Prev  Up  Next unregisterO...
-
language.function.debug
...ssigned variables; not the templates that are in use. However, you can see all t...
-
installing.smarty.extended
...::__construct(); $this- setTemplateDir('/web/www.example.com/guestbook/templates...
-
language.modifier.string.format
...ber', 23.5787446); ? Where template is: {$number} {$number|string_format:"%.2f"}...
-
api.append
...be seen as an array in the template $smarty- append('foo', 'Albert'); $array = a...
-
api.register.resource
...nding Smarty_Resource. See template resources for more information on how to set...
-
resources.streams
... Stream Template Resources Stream Template Resources stream, template, resources...
-
index
...Smarty - the compiling PHP template engine Monte Ohrt monte at ohrt dot com Uwe ...
-
language.function.fetch
...n will be assigned to this template variable instead of being output to the temp...
-
language.function.cycle
...e assign string No n/a The template variable the output will be assigned to rese...
-
language.modifier.strip.tags
...n b years /b ." ); ? Where template is: {$articleTitle} {$articleTitle|strip_tag...
-
language.modifier.indent
...ntly after 25.' ); ? Where template is: {$articleTitle} {$articleTitle|indent} {...
-
language.modifier.count.characters
...o Temperatures.'); ? Where template is: {$articleTitle} {$articleTitle|count_cha...
-
api.add.config.dir
...ify array-keys $smarty- addTemplateDir(array( 'two' = './config_2', 'three' = '....
-
advanced.features.objects
...to PHP objects through the templates. Note When you assign/register objects to t...
-
api.clear.compiled.tpl
... clearCompiledTemplate() clearCompiledTemplate() clearcompiledtemplate, clearCom...
-
language.modifier.count.paragraphs
... of Isolation." ); ? Where template is: {$articleTitle} {$articleTitle|count_par...
-
plugins.functions
... Template Functions Template Functions template, functions Template Functions Pr...
-
language.function.while
...few added features for the template engine. Every {while} must be paired with a ...
-
language.function.include
...e used for including other templates in the current template. Any variables avai...
-
language.function.math
...t {math} {math} allows the template designer to do math equations in the templat...
-
language.modifier.date.format
...rtotime('-1 day')); ? This template uses $smarty.now to get the current time: {$...
-
variable.left.delimiter
...left delimiter used by the template language. Default is { . See also $right_del...
-
language.function.include.php
...clude a php script in your template. The path of the attribute file can be eithe...
-
api.enable.security
...ecurity() — enables template security Description string enableSecuri...
-
variable.config.overwrite
...00 rowColors = #0000FF The template with a {section} loop. table {section name=r...
-
api.disable.security
...curity() — disables template security Description string disableSecur...
-
language.function.section
...ign('custid',$data); ? The template that outputs the array {* this example will ...
-
resources
...ces Table of Contents File Template Resources Templates from $template_dir Templ...
-
variable.compile.check
...ests to see if the current template has changed (different timestamp) since the ...
-
language.function.ldelim
...lim} are used for escaping template delimiters, by default { and } . You can als...
-
api.variables
...ble of Contents $allow_php_templates $auto_literal $autoload_filters $cache_dir ...
-
language.function.insert
...} tags are NOT cached when template caching is enabled. They will be executed on...
-
tips.wap
... Â Next WAP/WML WAP/WML templates require a php Content-Type header to be pas...
-
language.function.call
...} {call} is used to call a template function defined by the {function} tag just ...
-
language.function.function
... create functions within a template and call them just like a plugin function. I...
-
variable.use.include.path
...clude_path within the File Template Resource handler and the plugin loader to re...
-
language.function.capture
... collect the output of the template between the tags into a variable instead of ...
-
language.modifier.count.words
...r Talk at Noon.'); ? Where template is: {$articleTitle} {$articleTitle|count_wor...
-
api.clear.all.cache
...— clears the entire template cache Description void clearAllCache ( i...
-
language.modifier.nl2br
...rk tonight" ); ? Where the template is: {$articleTitle|nl2br} Will output: Sun o...
-
api.create.data
... object or to user-created template object. These objects can be chained. Templa...
-
variable.direct.access.security
...cess to compiled or cached template files. Direct access security is enabled by ...
-
variable.force.cache
...forces Smarty to (re)cache templates on every invocation. It does not override t...
-
plugins.modifiers
...plied to a variable in the template before it is displayed or used in some other...
-
variable.merge.compiled.includes
...ty will merge the compiled template code of subtemplates into the compiled code ...
-
api.register.plugin
...at,time()); } ? And in the template {date_now} {* or to format differently *} {d...
-
api.register.class
...ter a class for use in the templates Description void registerClass ( string...
-
api.clear.cache
...s the cache for a specific template Description void clearCache ( string ...
-
language.modifier.cat
...orld didn't end"); ? Where template is: {$articleTitle|cat:' yesterday.'} Will o...
-
language.modifier.default
...sign('email', ''); ? Where template is: {$articleTitle|default:'no title'} {$myT...
-
advanced.features.prefilters
...tures  Next Prefilters Template prefilters are PHP functions that your templ...
-
variable.compile.locking
...nt compilation of the same template. Compile locking is enabled by default. To d...
-
variable.cache.id
...ferent content of the same template. See the caching section for more informatio...
-
language.function.html.options
...t', 9904); ? The following template will generate a drop-down list. Note the pre...