-
preface
...d designers quick and easy to maintain syntax easy to understand, no PHP knowled...
...rty gives you the tools to make a clean separation of presentation from applicat...
...ices section of the Smarty website. How does it work? Under the hood, Smarty "co...
...in our templates as single pages. We can then manipulate blocks of content withi...
... for application code, but quickly degenerates when mixed with HTML. Smarty's si...
... design was largely driven by these goals: clean separation of presentation from...
-
caching
...Cacheability of Plugins Custom Cache Implementation Caching is used to speed up ...
...y the minute, it would not make sense to cache this page. Setting Up Caching The...
...ing the front page of your website that does not change its content very often, ...
...ll to display() or fetch() by saving its output to a file. If a cached version o...
-
tips.obfuscating.email
...dresses is from web pages. To help combat this problem, you can make your email ...
...mbat this problem, you can make your email address show up in scrambled javascri...
...mail addresses is from web pages. To help combat this problem, you can make your...
-
language.function.insert
...he output will be assigned to script string No n/a The name of the php script th...
... must be included first to make it work. The path can be either absolute, or rel...
...reated, even within cached pages. This works good for things like banners, polls...
-
language.function.html.select.time
...v  Chapter 8. Custom Functions  Next {html_select_time} {html_sele...
...s value. This is useful to make the select-boxes read “ Please select â...
...a string that is parseable by PHP's strtotime() . Attribute Name Type Required D...
-
variable.cache.locking
...ng is disabled by default. To enable it set $cache_locking to TRUE . See also $l...
...s means resource intensive pages can be generated only once, even if they've bee...
... Cache locking is disabled by default. To enable it set $cache_locking to TRUE ....
-
language.syntax.variables
...variables are an exception to the $dollar syntax and are instead referenced with...
... the 5th element of a zero-indexed array {$foo.bar} -- display the "bar" key val...
.... You can reference arrays by index numerically or non-numerically. Also referen...
-
language.function.html.select.date
...v  Chapter 8. Custom Functions  Next {html_select_date} {html_sele...
...s value. This is useful to make the select-boxes read “ Please select â...
...amp or any string parsable by strtotime() , arrays as produced by this function ...
-
variable.escape.html
..._html Setting $escape_html to TRUE will escape all template variable output by w...
...hange the setting you must make sure that the templates get recompiled. Prev Â...
...l template variable output by wrapping it in htmlspecialchars({$output}, ENT_QUO...
-
api.create.template
...ce instead of passing this to each call to this function. It is used in the even...
...the same template, such as pages for displaying different products. See also the...
...hich later can be rendered by the display or fetch method. It uses the following...
-
api.append.by.ref
... merge ); This is used to append() values to the templates by reference. Tec...
... you merge two numerically indexed arrays, they may overwrite each other or resu...
... appendByRef() appendByRef() appendbyref, appendByRef() Prev  Chapter 14....
-
variable.default.modifiers
...s is an array of modifiers to implicitly apply to every variable in a template. ...
...y('escape:"htmlall"') . To make a variable exempt from default modifiers, add th...
...HTML-escape every variable by default, use array('escape:"htmlall"') . To make a...
-
bugs
...on of Smarty, or check the website. Prev  Up  Chapter 22. Resource...
-
language.function.extends
...tax for template resources to extend files outside of the $template_dir director...
...tends file=$parent_file} , make sure you include $parent_file in the $cache_id ....
-
advanced.features.static.classes
...in PHP. Note Direct access to PHP classes is not recommended. This ties the unde...
...ices section of the Smarty website. Example 17.10. static class access syn...
-
language.modifier.upper
... Next upper This is used to uppercase a variable. This is equivalent to the PH...
..., "If Strike isn't Settled Quickly it may Last a While."); ? Where template is: ...
-
caching.cacheable
...offers several options how to exclude sections of your output from caching. Gene...
...d in nocache mode you must make sure that all other variables used by that tag a...
...sily excluded from caching by using the {nocache} and {/nocache} tags. ExampleÂ...
-
what.is.smarty
...cilitates a manageable way to separate application logic and content from its pr...
...refore, the programmer can make changes to the application logic without the nee...
...hey are passed into Smarty by the application. Then the template designer edits ...
-
api.assign
... assign variables/objects to the templates Description void assign ( mixed...
...ices section of the Smarty website. Example 14.6. assign() ?php // passing...
...d {section} See also assignByRef() , getTemplateVars() , clearAssign() , append(...
-
language.variables
...ditional expressions, etc. To print a variable, simply enclose it in the delimit...
...name}, glad to see you can make it. br / {* this will not work as $variables are...
...iables that are referenced by preceding them with a dollar ( $ ) sign. ExampleÂ...
-
advanced.features.postfilters
...aded from the plugins directory by using the loadFilter() function or by setting...
... The postfilter above will make the compiled Smarty template index.tpl look like...
...from the plugins directory by using the loadFilter() function or by setting the ...
-
api.fetch
...in the event that you want to compile different versions of the same template, s...
... 40 characters. This helps make the text easier to read in mail programs that do...
-
resources.extends
... extends: resource is used to define child/parent relationships for template inh...
...tes from strings are used, make sure they are properly (url or base64) encoded. ...
...e" property is superseeded by the extends: resource. The templates within an inh...
-
api.register.object
...ou register/assign objects to templates, be sure that all properties and methods...
...ices section of the Smarty website. See the objects section for more information...
-
language.function.debug
...g} dumps the debug console to the page. This works regardless of the debug setti...
...ithin the template it does make sense to place the {debug} tag at the end of the...
-
installing.smarty.extended
...slightly more flexible way to setup Smarty is to extend the class and initialize...
...hp/includes/guestbook/ and make a new file called setup.php . In our example env...
-
api.append
...— append an element to an assigned array Description void append ( mi...
... you merge two numerically indexed arrays, they may overwrite each other or resu...
...raska')); ? See also appendByRef() , assign() and getTemplateVars() Prev  Up...
-
advanced.features.objects
...jects Smarty allows access to PHP objects through the templates. Note When you a...
...ices section of the Smarty website. There are two ways to access them. One way i...
... choose will be determined by your needs, but use the first method whenever poss...
-
language.function.section
...ke {foreach} which is used to loop over a single associative array . Every {sect...
... looping over sequentially indexed arrays of data , unlike {foreach} which is us...
...l determine the loop count by the array size, or you can pass an integer to spec...
-
variable.direct.access.security
...bits direct browser access to compiled or cached template files. Direct access s...
...hange the setting you must make sure that the templates get recompiled. Prev Â...
...access security is enabled by default. To disable it set $direct_access_security...
-
variable.merge.compiled.includes
...g $merge_compiled_includes to TRUE Smarty will merge the compiled template code ...
...hange the setting you must make sure that the templates get recompiled. See also...
...t $merge_compiled_includes By setting $merge_compiled_includes to TRUE Smarty wi...
-
language.modifier.default
... Next default This is used to set a default value for a variable. If the variabl...
...he blank variable handling pages. Prev  Up  Next date_format Home Â...