-
language.function.eval
...his may cache the compiled state and thus doesn't have to run the (comparably sl...
-
api.assign
...array('city' = 'Lincoln', 'state' = 'Nebraska')); // passing an array $myArray =...
-
language.variables
...es PHP code ?php $smarty = new Smarty(); $smarty- assign('firstname', 'Doug'); $...
...ssign('meetingPlace', 'New York'); $smarty- display('index.tpl'); ? index.tpl so...
-
api.display
...rty.class.php'); $smarty = new Smarty(); $smarty- setCaching(true); // only do d...
...rray( 'City' = 'Lincoln', 'State' = 'Nebraska', 'Zip' = '68502' ); $smarty- assi...
-
api.append
...array('city' = 'Lincoln', 'state' = 'Nebraska')); ? See also appendByRef() , ass...
-
language.function.html.select.time
-
language.modifiers
-
advanced.features.streams
-
installing.smarty.basic
...nged when you upgrade to a new version of Smarty. In the examples below the Smar...
-
tips.dates
-
variable.cache.lifetime
-
plugins.outputfilters
-
api.get.tags
...rty.class.php'); $smarty = new Smarty; // create template object $tpl = $smarty-...
-
api.unregister.plugin
-
language.function.php
-
language.modifier.truncate
-
variable.cache.dir
-
language.function.append
...g No n/a The index for the new array element. If not specified the value is appe...
-
language.modifier.spacify
-
language.variables.smarty
...is no longer used with the new {foreach} syntax, but is still supported with Sma...
-
api.template.exists
-
language.modifier.count.sentences
-
smarty.for.designers
-
language.function.strip
-
language.syntax.variables
-
api.assign.by.ref
-
language.function.html.select.date
-
language.variable.scopes
-
variable.escape.html
-
api.create.template
...rty.class.php'); $smarty = new Smarty; // create template object with its privat...
-
language.escaping
-
language.function.nocache
-
variable.config.read.hidden
-
api.append.by.ref
-
language.modifier.regex.replace
...h carriage return, tab and new line with a space *} {$articleTitle} {$articleTit...
-
caching
...ith a timetable containing new information by the minute, it would not make sens...
-
language.modifier.replace
-
variable.default.modifiers
-
language.syntax.quotes
-
advanced.features.template.inheritance
-
api.set.template.dir
-
language.custom.functions
-
language.syntax.attributes
-
api.register.default.plugin.handler
...ler Example ?php $smarty = new Smarty(); $smarty- registerDefaultPluginHandler('...
-
language.modifier.lower
-
language.function.config.load
-
language.function.textformat
-
api.is.cached
-
variable.template.dir
-
language.basic.syntax
-
language.builtin.functions
-
advanced.features
...ers = array(); } $smarty = new Smarty(); // enable security $smarty- enableSecur...
-
language.function.html.table
-
resources.string
...plate string will create a new compiled template file. If your template strings ...
-
plugins
-
advanced.features.template.settings
-
language.function.foreach
...attributes. This syntax is new to Smarty 3, however the Smarty 2.x syntax {forea...
-
plugins.prefilters.postfilters
-
caching.custom
...arty.class.php'; $smarty = new Smarty(); $smarty- caching_type = 'mysql'; /** * ...
-
tips
...ly. Many would use an {if} statement to handle this, but there is a shorthand wa...
-
language.function.html.checkboxes
-
chapter.debugging.console
... It is a set of javascript statements added to the very bottom of the generated ...
-
api.get.config.vars
-
language.function.extends
-
variable.config.booleanize
...n , true or yes , the {if} statement will execute. Defaults to TRUE . Prev  ...
-
api.config.load
-
troubleshooting
-
language.function.html.image
-
api.functions
-
plugins.block.functions
...n is called again with the new block contents in the parameter $content . If you...
-
variable.php.handling
-
language.combining.modifiers
-
preface
...ce Template inheritance is new to Smarty 3, and it's one of many great new featu...
-
tips.default.var.handling
-
plugins.writing
-
language.math
-
tips.passing.vars
...Notice that “ Smarty News †is printed if the $title variable is not...
-
api.get.template.vars
-
advanced.features.static.classes
-
variable.caching
-
advanced.features.outputfilters
-
plugins.inserts
-
smarty.for.programmers
-
language.modifier.upper
-
variable.right.delimiter
-
plugins.resources
...ruct() { try { $this- db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty",...
...d $db; // prepared fetch() statement protected $fetch; // prepared fetchTimestam...
-
appendixes
-
language.modifier.wordwrap
...eTitle', "Blind woman gets new kidney from dad she hasn't seen in years." ); ? W...
-
variable.debug_template
-
language.function.block
-
language.modifier.strip
...laces all repeated spaces, newlines and tabs with a single space, or with the su...
-
variable.autoload.filters
-
api.get.template.dir
-
caching.cacheable
-
what.is.smarty
... page that is displaying a newspaper article. The article $headline , $tagline ,...
-
caching.groups
...rty.class.php'); $smarty = new Smarty; $smarty- setCaching(Smarty::CACHING_LIFET...
-
language.function.if
... {if},{elseif},{else} {if} statements in Smarty have much the same flexibility a...
-
advanced.features.postfilters
-
api.set.cache.dir
-
language.function.setfilter
-
language.modifier.unescape
-
tips.obfuscating.email
-
language.modifier.escape
-
api.fetch
...rty.class.php'); $smarty = new Smarty; $smarty- setCaching(true); // set a separ...
-
resources.extends
-
api.register.filter
-
variable.debugging
-
language.function.assign
-
language.function.literal
...ded by whitespace. This is new behavior to Smarty 3. Example 7.59. {litera...
-
language.function.html.radios
-
resources.custom
...ruct() { try { $this- db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty",...
...d $db; // prepared fetch() statement protected $fetch; // prepared fetchTimestam...
-
config.files
-
api.register.object
-
language.config.variables
-
plugins.compiler.functions
-
api.get.cache.dir
-
api.unregister.resource
-
language.function.debug
-
installing.smarty.extended
...n one place. Lets create a new directory /php/includes/guestbook/ and make a new...
-
language.modifier.string.format
-
tips.componentized.templates
-
api.register.resource
... registerResource('mysql', new Smarty_Resource_Mysql()); ? See also unregisterRe...
-
resources.streams
-
index
...m Copyright © 2001-2011 New Digital Group, Inc. 2011-11-29 Table of Contents ...
...nction} example 7.44. {if} statements 7.45. {if} with more examples 7.46. Simple...
-
language.function.fetch
...er.com/68502/'} {* fetch a news headline file via ftp *} {fetch file='ftp://user...
-
language.function.cycle
-
language.modifier.strip.tags
...ts font face=\"helvetica\" New Kidney /font from Dad she Hasn't Seen in b years ...
-
language.modifier.indent
-
language.modifier.count.characters
-
api.add.config.dir
-
advanced.features.objects
...is my meth1'; } } $myobj = new My_Object; // registering the object (will be by ...
-
api.compile.all.templates
...rty.class.php'); $smarty = new Smarty; // force compilation of all template file...
-
api.clear.compiled.tpl
-
language.modifier.count.paragraphs
-
plugins.functions
-
language.function.while
...e flexibility as PHP while statements, with a few added features for the templat...
-
variable.default.template.handler.func
...andler_func ?php $smarty = new Smarty(); $smarty- default_template_handler_func ...
-
language.function.include
...ut changes to variables or new created variables inside the included template ha...
...mplate after the {include} statement. This default behaviour can be changed for ...
-
language.function.math
-
language.modifier.date.format
...e as a decimal number %n - newline character %p - either `am' or `pm' according ...
-
variable.left.delimiter
-
language.function.include.php
...atabase.class.php'); $db = new Db(); $db- query('select url, name from navigatio...
-
api.enable.security
-
variable.config.overwrite
-
api.disable.security
-
language.function.section
-
api.add.template.dir
-
resources
-
variable.compile.check
-
language.function.ldelim
-
api.variables
-
language.function.insert
-
tips.wap
...DTD/wml_1.1.xml" !-- begin new wml deck -- wml !-- begin first card -- card do t...
-
language.function.call
-
language.function.function
...n. Changes to variables or new created variables inside the template function ha...
-
variable.use.include.path
-
language.function.capture
-
language.modifier.count.words
-
api.clear.all.cache
-
language.modifier.nl2br
-
api.create.data
...rty.class.php'); $smarty = new Smarty; // create data object with its private va...
-
variable.direct.access.security
-
variable.force.cache
-
plugins.modifiers
-
variable.merge.compiled.includes
-
api.register.plugin
-
api.register.class
..."hello world"; } $smarty = new Smarty(); $smarty- registerClass("Foo", "Bar"); {...
-
api.clear.cache
-
language.modifier.cat
-
language.modifier.default
-
advanced.features.prefilters
-
variable.compile.locking
-
variable.cache.id
-
language.function.html.options