Login

Username


Password


Jump to

Smarty


Summary


Smarty is a template engine written in PHP. Smarty seperates PHP from HTML and is primarily used for the generation of dynamic HTML content, by allowing for the placement of special Smarty tags within a document.

From Wikipedia, the free encyclopedia.

Allowable tags include, but are not limited to, variables such as {$variable}, and a range of logical and loop operators.

Smarty is most often used by PHP-based applications to separate "business logic" from presentation. This makes for much cleaner coding and more flexible modification. For instance, one could typically modify a Smarty-based application's appearance (or, skin, if you will) easily, without ever looking at any business logic or PHP code.

Smarty lacks features like date formats like strftime or loops from a database. In vlibTemplate you can use setdbloop to parse your database content to your template. This is not possible with Smarty. On the other hand Smarty allows template programming with

and much more features. Other template engines do not support these commands in a template.