Topics

What is Smarty

Smarty is a third party library used by Exponent to process 'view' templates.  All page displays are passed through the Smarty template engine before being displayed.

In the old days, if you wanted a five (5) page site, you had to create five .html files written using the html format of embedding tags on the page such as <p> for a paragraph.  The pages displayed only the information and the markup placed on that page.  If you needed to update the site with new information, you might have to edit each of the five files and make sure they complimented each other. Or if you needed an additional page, you'd have to copy a page and then edit it.  HTML page processing is limited to what's stored in the .html file. 

Smarty template tiles in their essence, are an .html page but may contain Smarty markup tags with programming commands.  Smarty templates are processed as a PHP application before being displayed.  While .html markup tags use angle brackets '<ag>' to mark tags, Smarty uses curley braces '{tag}'.  As with other programming languages, Smarty provides control structure 'tags' such as if/else and loops for efficient coding.  Furthermore, 'tags' are used to display parameters and variables passed to the 'view' from the 'controller.'

 

Loading Help