Get Smarty


Donate Bitcoin Bitcoin

Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty

Buy cheap glasses from and save up to 80%.

Where to buy dental loupes? is your best choice!

Where to buy discount wedding dresses and cheap smart dresses free shipping -

Find Wedding Dresses Online at Canada from

Wholesale Fashion Jewelry from wholesalers

soccer kp is New 2016 Nike Mercurial Superfly V soccer cleats from



Math can be applied directly to variable values.

Example 3.7. math examples



{* some more complicated examples *}


{if ($foo+$bar.test%$baz*134232+10+$b+10)}


{assign var="foo" value="`$foo+$bar`"}



Although Smarty can handle some very complex expressions and syntax, it is a good rule of thumb to keep the template syntax minimal and focused on presentation. If you find your template syntax getting too complex, it may be a good idea to move the bits that do not deal explicitly with presentation to PHP by way of plugins or modifiers.

No comments for this page.
Post a Comment
All comments are moderated. Support questions are ignored, use the forums instead.
Email: (not shown)
What is 8 plus 17? (Are you human?)