Smarty
Summary
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
- regular expressions
- foreach
- if
- nl2br
and much more features. Other template engines do not support these commands in a template.
