-
language.builtin.functions
...ration @first @last @show @total {break} {continue} {function} {if},{elseif},{el...
...: Attribute Name Shorthand Type Required Default Description scope n/a string No...
...are compiled into corresponding inline PHP code for maximum performance. You can...
-
language.function.section
...step through the array backwards. max integer No n/a Sets the maximum number of ...
...t , rownum , loop , show , total . Example 7.63. Looping a simple array with {...
...each} loop. Attribute Name Type Required Default Description name string Yes n/a...
...: Name Description nocache Disables caching of the {section} loop Required attri...
-
index
...rrors() — mutes expected warnings and notices deliberately generated by Smarty...
...ration @first @last @show @total {break} {continue} {function} {if},{elseif},{el...
...ed_check $caching $caching_type $compile_check $compile_dir $compile_id $compile...
...Copyright © 2001-2011 New Digital Group, Inc. 2011-11-29 Table of Contents Pref...
-
variable.default.config.type
... $default_config_type $default_config_type , default_config_type $default_config...
...g_ctrl Home $default_modifiers ...
-
language.modifier.count.characters
...sign('articleTitle', 'Cold Wave Linked to Temperatures.'); ? Where template is: ...
...riable. Parameter Position Type Required Default Description 1 boolean No FALSE ...
... Chapter 5. Variable Modifiers Next count_characters This is used to coun...
-
language.modifier.from_charset
...ifier . Parameter Position Type Required Possible Values Default Description 1 s...
... Chapter 5. Variable Modifiers Next from_charset from_charset is used to ...
-
language.modifier.indent
... a tab. Parameter Position Type Required Default Description 1 integer No 4 This...
... Chapter 5. Variable Modifiers Next indent This indents a string on each ...
-
language.modifier.strip.tags
...n and . Parameter Position Type Required Default Description 1 bool No TRUE This...
... Chapter 5. Variable Modifiers Next strip_tags This strips out markup tag...
-
language.function.cycle
... of values. Attribute Name Type Required Default Description name string No defa...
-
language.function.fetch
...e template. Attribute Name Type Required Default Description file string Yes n/a...
...e system, http, or ftp and display the contents. If the file name begins with ht...
-
api.load.filter
...id loadFilter ( string type , string name...
...lugin. Example 14.34. Loading filter plugins ?php // load prefilter named 'tri...
-
variable.default.config.handler.func
...ed file * * @param string $type resource type (e.g. "file", "string", "eval", "r...
...ontent * @param integer $modified config's modification time * @param Smarty $sm...
-
language.modifier.string.format
...xt string_format This is a way to format strings, such as decimal numbers and su...
...atting. Parameter Position Type Required Default Description 1 string Yes n/a Th...
... Chapter 5. Variable Modifiers Next string_format This is a way to format...
-
plugins.compiler.functions
...ile name and * the time it was compiled. * -------------------------------------...
...: compiler.tplheader.php * Type: compiler * Name: tplheader * Purpose: Output he...
...Prev Chapter 18. Extending Smarty With Plugins Next Compiler Functions C...
-
language.function.html.radios
...ut / content (values are always escaped) Required attributes are values and outp...
...lt as well. Attribute Name Type Required Default Description name string No radi...
... {html_radios} {html_radios} , ldelim, html_radios, rdelim, {html_radios} Prev Â...
-
language.function.assign
... maths {assign var=running_total value=$running_total+$some_array[$row].some_val...
...Attributes: Attribute Name Type Required Default Description var string Yes n/a ...
...ed in PHP. Use at your own discretion. Note See also the short-form method of as...
-
api.display
...s is in the event that you want to compile different versions of the same templa...
... a valid template resource type and path. As an optional second parameter, you c...
... display() display() display, display() Prev Chapter 14. Smarty Class Metho...
-
api.register.filter
...the template code after it was compiled to PHP. See template postfilters for mor...
... registerFilter ( string type , mixed...
...late's output before it is displayed . See template output filters for more info...
-
api.fetch
...s is in the event that you want to compile different versions of the same templa...
... a valid template resource type and path. As an optional second parameter, you c...
...template output instead of displaying it. Supply a valid template resource type ...
-
language.modifier.escape
... html . Parameter Position Type Required Possible Values Default Description 1 s...
... Chapter 5. Variable Modifiers Next escape escape is used to encode or es...
-
plugins.naming.conventions
... must be named as follows: type . name .php Where type is one of these plugin ty...
...Prev Chapter 18. Extending Smarty With Plugins Next Naming Conventions P...
-
language.function.insert
...ic link here, and we don't want this contents cached with the page. In comes the...
...e template. Attribute Name Type Required Default Description name string Yes n/a...
...ts. These results are then displayed in the template in place of the {insert} ta...
-
language.function.html.options
...lt as well. Attribute Name Type Required Default Description values array Yes, u...
... as an html optgroup , and display the groups. Recursion is supported with optgr...
-
language.modifier.default
...gument. Parameter Position Type Required Default Description 1 string No empty T...
... Chapter 5. Variable Modifiers Next default This is used to set a default...
-
language.modifier.cat
...riable. Parameter Position Type Required Default Description 1 string No empty T...
... Chapter 5. Variable Modifiers Next cat This value is concatenated to the...
-
api.register.plugin
... registerPlugin ( string type , strin...
..."block", "compiler" and "modifier". name defines the name of the plugin. callbac...
-
plugins.modifiers
... modifier.capitalize.php * Type: modifier * Name: capitalize * Purpose: capitali...
... Modifiers Modifiers modifiers Modifiers Prev Chapter 18. Extending Smarty ...
-
language.function.capture
...name attribute {* we don't want to print a div tag unless content is displayed *...
...Attributes: Attribute Name Type Required Default Description name string Yes n/a...
...into a variable instead of displaying it. Any content between {capture name='foo...
-
language.function.function
...Attributes: Attribute Name Type Required Default Description name string Yes n/a...
...emplate. Otherwise you can directly use the function as {funcname ...} in the te...
-
language.function.call
...Attributes: Attribute Name Type Required Default Description name string Yes n/a...
...emplate. Otherwise you can directly use the function as {funcname ...} in the te...
-
tips.wap
... WAP/WML WAP/WML wap, wml WAP/WML Prev Chapter 21. Tips Tricks Next WAP/...
...ates require a php Content-Type header to be passed along with the template. The...
-
language.modifier.unescape
...ape modifier for the given types. Parameter Position Type Required Possible Valu...
... Chapter 5. Variable Modifiers Next unescape unescape is used to decode e...
-
language.function.ldelim
...ript language="JavaScript" type="text/javascript" function myJsFunction(){ldelim...
-
resources
...he file resource no longer walks through the include_path unless $use_include_pa...
...ate, you supply a resource type, followed by the appropriate path and template n...
...s Templates from $template_dir Templates from a specific $template_dir Templates...
-
language.function.include.php
... SmartyBC . Attribute Name Type Required Default Description file string Yes n/a...
...: Name Description nocache Disables caching of inluded PHP script {include_php} ...
-
language.modifier.date.format
...assed to date_format are always (except for mysql timestamps, see below) interpr...
...format. Parameter Position Type Required Default Description 1 string No %b %e, ...
... Chapter 5. Variable Modifiers Next date_format This formats a date and t...
-
language.function.math
...ion} loops. Attribute Name Type Required Default Description equation string Yes...
... 10, $row_width = 20, #col_div# = 2, assigned in template *} {math equation="hei...
-
language.function.include
...Attributes: Attribute Name Type Required Default Description file string Yes n/a...
...de} tags are used for including other templates in the current template. Any var...
-
variable.default.template.handler.func
...ed file * * @param string $type resource type (e.g. "file", "string", "eval", "r...
...ontent * @param integer $modified template's modification time * @param Smarty $...
-
plugins.functions
...s = array('Yes', 'No', 'No way', 'Outlook not so good', 'Ask again soon', 'Maybe...
...: function.eightball.php * Type: function * Name: eightball * Purpose: outputs a...
...Prev Chapter 18. Extending Smarty With Plugins Next Template Functions v...
-
language.function.html.select.date
...h and year. Attribute Name Type Required Default Description prefix string No Da...
...tes date dropdowns. It can display any or all of year, month, and day. All param...
-
language.function.config.load
...bal config variables are always loaded along with section variables, and same-na...
...Attributes: Attribute Name Type Required Default Description file string Yes n/a...
...onfig_load} is used for loading config #variables# from a configuration file int...
-
api.register.default.plugin.handler
... looping over valid plugin types. Example 14.38. Default Plugin Handler Exampl...
...COMPILER, Smarty::PLUGIN_MODIFIER, Smarty::PLUGIN_MODIFIERCOMPILER) * @param Sma...
-
language.modifier.to_charset
...ifier . Parameter Position Type Required Possible Values Default Description 1 s...
... Chapter 5. Variable Modifiers Next to_charset to_charset is used to tran...
-
language.function.mailto
... Any extra information you want passed to the link, such as style sheet classes ...
...coding too. Attribute Name Type Required Default Description address string Yes ...
...tionally encodes them. Encoding emails makes it more difficult for web spiders t...
-
language.custom.functions
...e template. Attribute Name Type Required Default Description name string No defa...
...ge} {html_options} {html_radios} {html_select_date} {html_select_time} {html_tab...
-
advanced.features.template.inheritance
...tree can be as deep as you want, meaning you can extend a file that extends anot...
...extends: template resource type. The later provides even more flexibillity. Note...
...d by child templates. Extending means that the child template can override all o...
-
language.modifier.replace
...nction. Parameter Position Type Required Default Description 1 string Yes n/a Th...
... Chapter 5. Variable Modifiers Next replace A simple search and replace o...
-
language.modifier.regex.replace
...ameters Parameter Position Type Required Default Description 1 string Yes n/a Th...
... Chapter 5. Variable Modifiers Next regex_replace A regular expression se...
-
api.create.template
...used in the event that you want to cache different content of the same template,...
... a valid template resource type and path. cache_id is an optional parameter. You...
...ter can be rendered by the display or fetch method. It uses the following parame...
-
language.function.textformat
...able style. Attribute Name Type Required Default Description style string No n/a...
-
smarty.for.designers
...ration @first @last @show @total {break} {continue} {function} {if},{elseif},{el...
... Functions Attributes Embedding Vars in Double Quotes Math Escaping Smarty Parsi...
-
language.modifier.spacify
... Next spacify spacify is a way to insert a space between every character of a va...
...insert. Parameter Position Type Required Default Description 1 string No one spa...
... Chapter 5. Variable Modifiers Next spacify spacify is a way to insert a ...
-
variable.default.resource.type
... $default_resource_type $default_resource_type , default_resource_type $default_...
...le , meaning that $smarty- display('index.tpl') and $smarty- display('file:index...
-
language.function.append
...Attributes: Attribute Name Type Required Default Description var string Yes n/a ...
... used for creating or appending template variable arrays during the execution of...
-
language.modifier.truncate
...at the end if the variable was truncated. The characters in the string are inclu...
... TRUE . Parameter Position Type Required Default Description 1 integer No 80 Thi...
... Chapter 5. Variable Modifiers Next truncate This truncates a variable to...
-
api.unregister.plugin
...on plugin ?php // we don't want template designers to have access to function pl...
...nregisterPlugin ( string type , s...
..."block", "compiler" and "modifier". name defines the name of the plugin. Example...
-
plugins.outputfilters
...filter.protect_email.php * Type: outputfilter * Name: protect_email * Purpose: C...
...Prev Chapter 18. Extending Smarty With Plugins Next Output Filters Outpu...
-
language.modifiers
... Note The default behavior was changed with Smarty 3. In Smarty 2.x, you had to ...
...iers can be applied to any type of variables, including arrays and objects. Note...
... Chapter 5. Variable Modifiers Chapter 5. Variable Modifiers chapter, 5, var...
-
language.function.html.checkboxes
...ut / content (values are always escaped) Required attributes are values and outp...
...lt as well. Attribute Name Type Required Default Description name string No chec...
...' br / '} See also {html_radios} and {html_options} Prev Up Next {fetch} ...
-
language.variables
..."{#bgcolor#}" Note An easy way to examine assigned Smarty variables is with the ...
...arty has several different types of variables. The type of the variable depends ...
...template} {$smarty.current_dir} {$smarty.version} {$smarty.block.child} {$smarty...
-
language.function.block
...}The {$smarty.block.child} was inserted here{/block} /title /head /html child.tp...
...Attributes: Attribute Name Type Required Default Description name string Yes n/a...
...e will replace the correponding areas in the parent template(s). Optionally {blo...
-
language.modifier.wordwrap
...at a word boundary. If you want to cut off at the exact character length, pass t...
...nction. Parameter Position Type Required Default Description 1 integer No 80 Thi...
... Chapter 5. Variable Modifiers Next wordwrap Wraps a string to a column w...
-
plugins.inserts
...apter 19. SmartyBC - Backwards Compatibility Wrapper ...
... * File: insert.time.php * Type: time * Name: time * Purpose: Inserts current da...
...Prev Chapter 18. Extending Smarty With Plugins Next Inserts Insert plugi...
-
preface
...ilosophy The Smarty design was largely driven by these goals: clean separation o...
...re no restrictions on what type of logic can be injected into a template. Smarty...
...stead use simple tags to indicate where application content is revealed. This ap...
-
plugins.block.functions
...ile: block.translate.php * Type: block * Name: translate * Purpose: translate a ...
...Prev Chapter 18. Extending Smarty With Plugins Next Block Functions void...
-
language.function.html.image
...ath. This is useful if you want to supply a different server name for the image....
...t supplied. Attribute Name Type Required Default Description file string Yes n/a...
...ual image height Height to display image width string No actual image width Widt...
-
api.unregister.filter
...nregisterFilter ( string type , s...
-
language.function.extends
...Attributes: Attribute Name Type Required Default Description file string Yes n/a...
...plate inheritance for extending parent templates. For details see section of Tem...
-
language.function.html.select.time
...rtotime() . Attribute Name Type Required Default Description prefix string No Ti...
... dropdowns for you. It can display any or all of hour, minute, second and meridi...
-
plugins.prefilters.postfilters
...ile: prefilter.pre01.php * Type: prefilter * Name: pre01 * Purpose: Convert html...
...Prev Chapter 18. Extending Smarty With Plugins Next Prefilters/Postfilte...
-
language.function.foreach
...= $myValue} , the key is always available as $myValue@key within the foreach loo...
... @first , @last , @show , @total . {foreach} constructs are {break} , {continue}...
...: Name Description nocache Disables caching of the {foreach} loop Example 7.30....
-
plugins
...xception of resources, backwards compatibility with the old way of registering h...
...ltiple filters of the same type are executed depends on the order in which they ...
... Chapter 18. Extending Smarty With Plugins Chapter 18. Extending Smarty With...
-
resources.string
... fill your disk space with wasted compiled strings. Example 16.5. Using templa...
...te With a string: resource type, each unique string generates a compiled file. S...
...save compiled templates to disk. The eval: resource evaluates the template sourc...
-
language.function.html.table
...TML table . Attribute Name Type Required Default Description loop array Yes n/a ...
...eparated list of column heading names or an array of column heading names.if the...
-
variable.template.dir
...u do not supply a resource type when including files, they will be found here. B...
... $template_dir $template_dir , template_dir $template_dir Prev Chapter 13. ...
-
language.function.for
...: Attribute Name Shorthand Type Required Default Description max n/a integer No ...
...imple loops. The following different formarts are supported: {for $var=$start to...
-
language.function.eval
...e template. Attribute Name Type Required Default Description var mixed Yes n/a V...
... used for things like embedding template tags/variables into variables or tags/v...