-
variable.default.config.type
... $default_config_type $default_config_type , default_config_type $default_config...
-
variable.default.config.handler.func
...ed file * * @param string $type resource type (e.g. "file", "string", "eval", "r...
-
language.modifier.count.characters
...sign('articleTitle', 'Cold Wave Linked to Temperatures.'); ? Where template is: ...
...ve Linked to Temperatures. 29 33 See also count_words , count_sentences and coun...
...riable. Parameter Position Type Required Default Description 1 boolean No FALSE ...
-
language.modifier.from_charset
...ifier . Parameter Position Type Required Possible Values Default Description 1 s...
-
language.modifier.indent
...y characters to indent to. 2 string No (one space) This is the character used to...
... a tab. Parameter Position Type Required Default Description 1 integer No 4 This...
-
language.modifier.strip.tags
...ed by ' ' or '' Example 5.20. strip_tags ?php $smarty- assign('articleTitle', ...
...n and . Parameter Position Type Required Default Description 1 bool No TRUE This...
-
language.function.cycle
...o the template. Example 8.2. {cycle} {section name=rows loop=$data} tr class="...
... of values. Attribute Name Type Required Default Description name string No defa...
-
language.function.fetch
...tp://www.myweather.com/68502/'} {* fetch a news headline file via ftp *} {fetch ...
...e template. Attribute Name Type Required Default Description file string Yes n/a...
-
index
...rrors() — mutes expected warnings and notices deliberately generated by Smarty...
...email dot com Copyright © 2001-2011 New Digital Group, Inc. 2011-11-29 Table of...
...ed_check $caching $caching_type $compile_check $compile_dir $compile_id $compile...
-
api.load.filter
...id loadFilter ( string type , string name...
-
plugins.functions
...s = array('Yes', 'No', 'No way', 'Outlook not so good', 'Ask again soon', 'Maybe...
...: {eightball}. Example 18.2. function plugin without output ?php /* * Smarty p...
...: function.eightball.php * Type: function * Name: eightball * Purpose: outputs a...
-
language.modifier.string.format
...xt string_format This is a way to format strings, such as decimal numbers and su...
... $smarty- assign('number', 23.5787446); ? Where template is: {$number} {$number|...
...atting. Parameter Position Type Required Default Description 1 string Yes n/a Th...
-
plugins.compiler.functions
...ile name and * the time it was compiled. * -------------------------------------...
...cho 'index.tpl compiled at 2002-02-20 20:02'; ? See also registerPlugin() , unre...
...: compiler.tplheader.php * Type: compiler * Name: tplheader * Purpose: Output he...
-
language.function.html.radios
...ut / content (values are always escaped) Required attributes are values and outp...
...t_ids', array(1000,1001,1002,1003)); $smarty- assign('cust_names', array( 'Joe S...
...lt as well. Attribute Name Type Required Default Description name string No radi...
-
language.function.assign
...e="value"} ... Example 7.12. {assign} a variable to current scope tree You can...
...Attributes: Attribute Name Type Required Default Description var string Yes n/a ...
-
api.display
...s is in the event that you want to compile different versions of the same templa...
...y up some data $address = '245 N 50th'; $db_data = array( 'City' = 'Lincoln', 'S...
... a valid template resource type and path. As an optional second parameter, you c...
-
api.register.filter
...the template code after it was compiled to PHP. See template postfilters for mor...
... registerFilter ( string type , mixed...
-
api.fetch
...s is in the event that you want to compile different versions of the same templa...
...this function. Example 14.21. fetch() ?php include('Smarty.class.php'); $smart...
... a valid template resource type and path. As an optional second parameter, you c...
-
language.modifier.escape
... the escape format to use. 2 string No ISO-8859-1 , UTF-8 , and any character se...
... html . Parameter Position Type Required Possible Values Default Description 1 s...
-
language.function.insert
...ic link here, and we don't want this contents cached with the page. In comes the...
..._getBanner(array("lid" = "12345","sid" = "67890")); and display the returned res...
...e template. Attribute Name Type Required Default Description name string Yes n/a...
-
language.function.html.options
...moe', 9904 = 'Jack Smith', 2003 = 'Charlie Brown') ); $smarty- assign('mySelect'...
...lt as well. Attribute Name Type Required Default Description values array Yes, u...
-
language.modifier.default
...gument. Parameter Position Type Required Default Description 1 string No empty T...
-
language.modifier.cat
...riable. Parameter Position Type Required Default Description 1 string No empty T...
-
api.register.plugin
... registerPlugin ( string type , strin...
-
plugins.modifiers
... modifier.capitalize.php * Type: modifier * Name: capitalize * Purpose: capitali...
-
language.function.capture
...name attribute {* we don't want to print a div tag unless content is displayed *...
...e this content. Example 7.21. {capture} with the name attribute {* we don't wa...
...Attributes: Attribute Name Type Required Default Description name string Yes n/a...
-
language.function.function
... *} {$menu = ['item1','item2','item3' = ['item3-1','item3-2','item3-3' = ['item3...
...Attributes: Attribute Name Type Required Default Description name string Yes n/a...
-
language.function.call
...in nocache mode Example 7.20. Calling a recursive menu example {* define the f...
...Attributes: Attribute Name Type Required Default Description name string Yes n/a...
-
tips.wap
... WAP/WML WAP/WML wap, wml WAP/WML Prev Chapter 21. Tips Tricks Next WAP/...
...l WAP/WML Prev Chapter 21. Tips Tricks Next WAP/WML WAP/WML templates re...
...ates require a php Content-Type header to be passed along with the template. The...
-
plugins.naming.conventions
... must be named as follows: type . name .php Where type is one of these plugin ty...
-
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...
...resource type. Example 16.2. Specifying the $template_dir to use ?php // setup...
...ate, you supply a resource type, followed by the appropriate path and template n...
-
language.function.section
...step through the array backwards. max integer No n/a Sets the maximum number of ...
...dexed, and sequential (0,1,2,...). For associative arrays, use the {foreach} loo...
...each} loop. Attribute Name Type Required Default Description name string Yes n/a...
-
language.function.include.php
... SmartyBC . Attribute Name Type Required Default Description file string Yes n/a...
-
language.modifier.date.format
...assed to date_format are always (except for mysql timestamps, see below) interpr...
...at for the outputted date. 2 string No n/a This is the default date if the input...
...format. Parameter Position Type Required Default Description 1 string No %b %e, ...
-
language.function.math
... variable value Example 8.21. {math} Example a: {* $height=4, $width=5 *} {mat...
...ion} loops. Attribute Name Type Required Default Description equation string Yes...
-
language.function.include
...' caching} ... Example 7.52. {include} and assign to variable This example ass...
...Attributes: Attribute Name Type Required Default Description file string Yes n/a...
-
variable.default.template.handler.func
...ed file * * @param string $type resource type (e.g. "file", "string", "eval", "r...
-
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...
-
language.function.textformat
... be assigned to Example 8.22. {textformat} {textformat wrap=40} This is foo. T...
...able style. Attribute Name Type Required Default Description style string No n/a...
-
language.function.config.load
...bal config variables are always loaded along with section variables, and same-na...
... all templates. Example 7.24. {config_load} The example.conf file. #this is co...
...Attributes: Attribute Name Type Required Default Description file string Yes n/a...
-
api.register.default.plugin.handler
... looping over valid plugin types. Example 14.38. Default Plugin Handler Exampl...
-
language.modifier.to_charset
...ifier . Parameter Position Type Required Possible Values Default Description 1 s...
-
language.function.mailto
... Any extra information you want passed to the link, such as style sheet classes ...
...e sheet classes Example 8.20. {mailto} example lines followed by the result {m...
...coding too. Attribute Name Type Required Default Description address string Yes ...
-
language.custom.functions
...t *} {counter start=0 skip=2} br / {counter} br / {counter} br / {counter} br / ...
...e template. Attribute Name Type Required Default Description name string No defa...
-
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...
-
language.modifier.replace
...ng of text to be replaced. 2 string Yes n/a This is the string of text to replac...
...nction. Parameter Position Type Required Default Description 1 string Yes n/a Th...
-
language.modifier.regex.replace
...expression to be replaced. 2 string Yes n/a This is the string of text to replac...
...ameters Parameter Position Type Required Default Description 1 string Yes n/a Th...
-
language.function.eval
...e template. Attribute Name Type Required Default Description var mixed Yes n/a V...
-
language.function.html.select.date
...hs. array(1 = 'Jan', …, 12 = 'Dec') month_names string No %B What format the m...
...h and year. Attribute Name Type Required Default Description prefix string No Da...
-
language.modifier.spacify
... Next spacify spacify is a way to insert a space between every character of a va...
...^. See also wordwrap and nl2br . Prev Up Next replace Home string_form...
...insert. Parameter Position Type Required Default Description 1 string No one spa...
-
variable.default.resource.type
... $default_resource_type $default_resource_type , default_resource_type $default_...
-
language.function.append
...Attributes: Attribute Name Type Required Default Description var string Yes n/a ...
-
language.modifier.truncate
...at the end if the variable was truncated. The characters in the string are inclu...
...characters to truncate to. 2 string No ... This is a text string that replaces t...
... TRUE . Parameter Position Type Required Default Description 1 integer No 80 Thi...
-
api.unregister.plugin
...on plugin ?php // we don't want template designers to have access to function pl...
...nregisterPlugin ( string type , s...
-
plugins.outputfilters
...a-zA-Z0-9\.\-]+\.([a-zA-Z]{2,3}|[0-9]{1,3}))!', '$1%40$2', $output); } ? See als...
...filter.protect_email.php * Type: outputfilter * Name: protect_email * Purpose: C...
-
language.modifiers
... Note The default behavior was changed with Smarty 3. In Smarty 2.x, you had to ...
...rom_charset indent lower nl2br regex_replace replace spacify string_format strip...
...iers can be applied to any type of variables, including arrays and objects. Note...
-
language.function.extends
...ich is extended Example 7.26. Simple {extends} example {extends file='parent.t...
...Attributes: Attribute Name Type Required Default Description file string Yes n/a...
-
language.modifier.unescape
... the escape format to use. 2 string No ISO-8859-1 , UTF-8 , and any character se...
...ape modifier for the given types. Parameter Position Type Required Possible Valu...
-
language.variables
..."{#bgcolor#}" Note An easy way to examine assigned Smarty variables is with the ...
...lar ( $ ) sign. Example 4.2. Assigned variables PHP code ?php $smarty = new Sm...
...arty has several different types of variables. The type of the variable depends ...
-
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...
-
language.modifier.wordwrap
...at a word boundary. If you want to cut off at the exact character length, pass t...
...w many columns to wrap to. 2 string No \n This is the string used to wrap words ...
...nction. Parameter Position Type Required Default Description 1 integer No 80 Thi...
-
plugins.inserts
...apter 19. SmartyBC - Backwards Compatibility Wrapper ...
... * File: insert.time.php * Type: time * Name: time * Purpose: Inserts current da...
-
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...
-
plugins.block.functions
...ile: block.translate.php * Type: block * Name: translate * Purpose: translate a ...
-
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...
-
api.unregister.filter
...nregisterFilter ( string type , s...
-
language.function.html.select.time
...splay meridian (am/pm) use_24_hours boolean No TRUE Whether or not to use 24 hou...
...rtotime() . Attribute Name Type Required Default Description prefix string No Ti...
-
language.function.html.checkboxes
...ut / content (values are always escaped) Required attributes are values and outp...
...t_ids', array(1000,1001,1002,1003)); $smarty- assign('cust_names', array( 'Joe S...
...lt as well. Attribute Name Type Required Default Description name string No chec...
-
plugins.prefilters.postfilters
...ile: prefilter.pre01.php * Type: prefilter * Name: pre01 * Purpose: Convert html...
-
plugins
...xception of resources, backwards compatibility with the old way of registering h...
... Resources Inserts Version 2.0 introduced the plugin architecture that is used f...
...ltiple filters of the same type are executed depends on the order in which they ...
-
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...
-
language.function.html.table
...y- assign( 'data', array(1,2,3,4,5,6,7,8,9) ); $smarty- assign( 'tr', array('bgc...
...TML table . Attribute Name Type Required Default Description loop array Yes n/a ...
-
language.builtin.functions
...f $name is Bob. Example 7.2. Assignment with math {$running_total=$running_tot...
...: Attribute Name Shorthand Type Required Default Description scope n/a string No...
-
variable.template.dir
...u do not supply a resource type when including files, they will be found here. B...
-
language.function.for
... the {for} loop Example 7.27. A simple {for} loop ul {for $foo=1 to 3} li {$fo...
...: Attribute Name Shorthand Type Required Default Description max n/a integer No ...