-
variable.default.config.type
... $default_config_type $default_config_type , default_config_type $default_config...
...nfig_type Prev Chapter 13. Smarty Class Variables Next $default_config_t...
-
variable.default.config.handler.func
...ed file * * @param string $type resource type (e.g. "file", "string", "eval", "r...
...dler_func Prev Chapter 13. Smarty Class Variables Next $default_config_h...
-
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 ...
...quired Default Description 1 boolean No FALSE This determines whether or not to ...
-
language.modifier.from_charset
...ifier . Parameter Position Type Required Possible Values Default Description 1 s...
...Values Default Description 1 string No ISO-8859-1 , UTF-8 , and any character se...
-
language.modifier.indent
... a tab. Parameter Position Type Required Default Description 1 integer No 4 This...
...quired Default Description 1 integer No 4 This determines how many characters to...
-
language.modifier.strip.tags
...n and . Parameter Position Type Required Default Description 1 bool No TRUE This...
...quired Default Description 1 bool No TRUE This determines whether the tags are r...
-
language.function.cycle
... of values. Attribute Name Type Required Default Description name string No defa...
... output: tr class="odd" td 1 /td /tr tr class="even" td 2 /td /tr tr class="odd"...
-
language.function.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...
...ed_check $caching $caching_type $compile_check $compile_dir $compile_id $compile...
...shooting Smarty/PHP errors 21. Tips Tricks Blank Variable Handling Default Varia...
...il dot com Copyright © 2001-2011 New Digital Group, Inc. 2011-11-29 Table of Co...
-
api.load.filter
...id loadFilter ( string type , string name...
...dFilter() Prev Chapter 14. Smarty Class Methods Next Name loadFilter() â...
-
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...
...Functions Prev Chapter 18. Extending Smarty With Plugins Next Template F...
-
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...
...quired Default Description 1 string Yes n/a This is what format to use. (sprintf...
-
plugins.compiler.functions
...ile name and * the time it was compiled. * -------------------------------------...
...: compiler.tplheader.php * Type: compiler * Name: tplheader * Purpose: Output he...
...Functions Prev Chapter 18. Extending Smarty With Plugins Next Compiler F...
-
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...
...ed input -tags. Example 8.13. {html_radios} first example ?php $smarty- assign...
-
language.function.assign
...Attributes: Attribute Name Type Required Default Description var string Yes n/a ...
...f $name is Bob. Example 7.10. {assign} with some maths {assign var=running_tot...
-
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() Prev Chapter 14. Smarty Class Methods Next Name display() — ...
-
api.register.filter
...the template code after it was compiled to PHP. See template postfilters for mor...
... registerFilter ( string type , mixed...
...rFilter() Prev Chapter 14. Smarty Class Methods Next Name registerFilter...
-
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...
...this function. Example 14.21. fetch() ?php include('Smarty.class.php'); $smart...
..., fetch() Prev Chapter 14. Smarty Class Methods Next Name fetch() — re...
-
language.modifier.escape
... html . Parameter Position Type Required Possible Values Default Description 1 s...
...Values Default Description 1 string No html , htmlall , url , urlpathinfo , quot...
-
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...
...stead. Note As of Smarty 3.1 the {insert} tags are only available from SmartyBC ...
-
language.function.html.options
...lt as well. Attribute Name Type Required Default Description values array Yes, u...
...assign('myOptions', array( 1800 = 'Joe Schmoe', 9904 = 'Jack Smith', 2003 = 'Cha...
-
language.modifier.default
...gument. Parameter Position Type Required Default Description 1 string No empty T...
...quired Default Description 1 string No empty This is the default value to output...
-
language.modifier.cat
...riable. Parameter Position Type Required Default Description 1 string No empty T...
...quired Default Description 1 string No empty This value to catenate to the given...
-
api.register.plugin
... registerPlugin ( string type , strin...
...rPlugin() Prev Chapter 14. Smarty Class Methods Next Name registerPlugin...
-
plugins.modifiers
... modifier.capitalize.php * Type: modifier * Name: capitalize * Purpose: capitali...
...Modifiers Prev Chapter 18. Extending Smarty With Plugins Next Modifiers ...
-
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...
...e this content. Example 7.21. {capture} with the name attribute {* we don't wa...
... this content. Example 7.21. {capture} with the name attribute {* we don't wan...
-
language.function.function
...Attributes: Attribute Name Type Required Default Description name string Yes n/a...
...u data=$entry level=$level+1} {else} li {$entry} /li {/if} {/foreach} /ul {/func...
-
language.function.call
...Attributes: Attribute Name Type Required Default Description name string Yes n/a...
...u data=$entry level=$level+1} {else} li {$entry} /li {/if} {/foreach} /ul {/func...
-
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...
...l WAP/WML Prev Chapter 21. Tips Tricks Next WAP/WML WAP/WML templates re...
... WAP/WML Prev Chapter 21. Tips Tricks Next WAP/WML WAP/WML templates req...
-
plugins.naming.conventions
... must be named as follows: type . name .php Where type is one of these plugin ty...
...nventions Prev Chapter 18. Extending Smarty With Plugins Next Naming Con...
-
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...
... Chapter 16. Resources Chapter 16. Resources chapter, 16, resources ChapterÂ...
-
language.function.section
...step through the array backwards. max integer No n/a Sets the maximum number of ...
...each} loop. Attribute Name Type Required Default Description name string Yes n/a...
...r / {section name=bar loop=21 max=6 step=-2} {$smarty.section.bar.index} {/secti...
...indexed, and sequential (0,1,2,...). For associative arrays, use the {foreach} l...
-
language.function.include.php
... SmartyBC . Attribute Name Type Required Default Description file string Yes n/a...
...ation code. As of Smarty 3.1 the {include_php} tags are only available from Smar...
-
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, ...
...1/01/22 02:33 pm Dec 31, 2021 Monday, December 1, 2021 14:33:00 date_format conv...
...quired Default Description 1 string No %b %e, %Y This is the format for the outp...
-
language.function.math
...ion} loops. Attribute Name Type Required Default Description equation string Yes...
... variable value Example 8.21. {math} Example a: {* $height=4, $width=5 *} {mat...
..., cos, exp, floor, log, log10, max, min, pi, pow, rand, round, sin, sqrt, srans ...
-
language.function.include
...Attributes: Attribute Name Type Required Default Description file string Yes n/a...
...teime=500} ... Example 7.51. {include} with forced caching In this example inc...
-
variable.default.template.handler.func
...ed file * * @param string $type resource type (e.g. "file", "string", "eval", "r...
...dler_func Prev Chapter 13. Smarty Class Variables Next $default_template...
-
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...
...emplate() Prev Chapter 14. Smarty Class Methods Next Name createTemplate...
-
language.function.textformat
...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...
...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...
...Handler() Prev Chapter 14. Smarty Class Methods Next Name registerDefaul...
-
language.modifier.to_charset
...ifier . Parameter Position Type Required Possible Values Default Description 1 s...
...Values Default Description 1 string No ISO-8859-1 , UTF-8 , and any character se...
-
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 ...
...m?subject=Hello%20to%20you%21" me@example.com /a {mailto address="me@example.com...
...('%64%6f% ... snipped ...%61%3e%27%29%3b')) /script {mailto address="me@example....
-
language.custom.functions
...e template. Attribute Name Type Required Default Description name string No defa...
...he counter start number No 1 The initial number to start counting from skip numb...
-
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...
...heritance Prev Chapter 17. Advanced Features Next Template Inheritance I...
-
language.modifier.replace
...nction. Parameter Position Type Required Default Description 1 string Yes n/a Th...
...quired Default Description 1 string Yes n/a This is the string of text to be rep...
-
language.modifier.regex.replace
...ameters Parameter Position Type Required Default Description 1 string Yes n/a Th...
...quired Default Description 1 string Yes n/a This is the regular expression to be...
-
language.function.eval
...e template. Attribute Name Type Required Default Description var mixed Yes n/a V...
-
language.function.html.select.date
...h and year. Attribute Name Type Required Default Description prefix string No Da...
... display for months. array(1 = 'Jan', …, 12 = 'Dec') month_names string No %B ...
-
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...
...quired Default Description 1 string No one space This what gets inserted between...
-
variable.default.resource.type
... $default_resource_type $default_resource_type , default_resource_type $default_...
...urce_type Prev Chapter 13. Smarty Class Variables Next $default_resource...
-
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...
... TRUE . Parameter Position Type Required Default Description 1 integer No 80 Thi...
...es are ignored. Example 5.21. truncate ?php $smarty- assign('articleTitle', 'T...
...quired Default Description 1 integer No 80 This determines how many characters t...
-
api.unregister.plugin
...on plugin ?php // we don't want template designers to have access to function pl...
...nregisterPlugin ( string type , s...
...terPlugin Prev Chapter 14. Smarty Class Methods Next Name unregisterPlug...
-
plugins.outputfilters
...filter.protect_email.php * Type: outputfilter * Name: protect_email * Purpose: C...
...t Filters Prev Chapter 18. Extending Smarty With Plugins Next Output Fil...
-
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...
...n be combined . Example 5.1. Modifier examples {* apply modifier to a variable...
-
language.function.extends
...Attributes: Attribute Name Type Required Default Description file string Yes n/a...
-
language.modifier.unescape
...ape modifier for the given types. Parameter Position Type Required Possible Valu...
...Values Default Description 1 string No html , htmlall , entity , html This is th...
-
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 ...
...d between them. Example 4.1. Example variables {$Name} {$product.part_no} b {$...
-
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...
...{block} content Example 7.15. Simple {block} example parent.tpl html head titl...
-
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...
...quired Default Description 1 integer No 80 This determines how many columns to w...
-
plugins.inserts
...apter 19. SmartyBC - Backwards Compatibility Wrapper ...
... * File: insert.time.php * Type: time * Name: time * Purpose: Inserts current da...
...s Inserts Prev Chapter 18. Extending Smarty With Plugins Next Inserts In...
-
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...
...license for commercial use 100% free to use, open source project Prev N...
-
plugins.block.functions
...ile: block.translate.php * Type: block * Name: translate * Purpose: translate a ...
...Functions Prev Chapter 18. Extending Smarty With Plugins Next Block Func...
-
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...
...rFilter() Prev Chapter 14. Smarty Class Methods Next Name unregisterFilt...
-
language.function.html.select.time
...rtotime() . Attribute Name Type Required Default Description prefix string No Ti...
...d 20 /option option value="21" 21 /option ... snipped .... option value="58" 58 ...
...minute_interval integer No 1 Number interval in minute dropdown second_interval ...
-
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...
...- assign('cust_ids', array(1000,1001,1002,1003)); $smarty- assign('cust_names', ...
-
plugins.prefilters.postfilters
...ile: prefilter.pre01.php * Type: prefilter * Name: pre01 * Purpose: Convert html...
...stfilters Prev Chapter 18. Extending Smarty With Plugins Next Prefilters...
-
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...
...Resources Prev Chapter 16. Resources Next String Template Resources Smar...
-
language.function.html.table
...TML table . Attribute Name Type Required Default Description loop array Yes n/a ...
...ble_attr string No border="1" Attributes for table tag th_attr string No empty A...
-
language.builtin.functions
...: Attribute Name Shorthand Type Required Default Description scope n/a string No...
...ache' attribute Example 7.1. Simple assignment {$name='Bob'} The value of $nam...
-
variable.template.dir
...u do not supply a resource type when including files, they will be found here. B...
...plate_dir Prev Chapter 13. Smarty Class Variables Next $template_dir Thi...
-
language.function.for
...: Attribute Name Shorthand Type Required Default Description max n/a integer No ...
...ple loop with step size of 1. {for $var=$start to $end step $step} loop with ind...