Understanding Smarty Template Basics

Smarty Documentation

In this area we'll attempt to give a few pointers regarding Smarty, which is the template engine used by Exponent.  There are many things that can be done with native smarty functionality.  We encourage you to visit the Smarty templating engine home page for more information.

Smarty Basics Guides

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. ...

Using Smarty

Smarty tags are used to display variables passed from the controller to the view.  It it also used to manipulate those variables or act in response the the passed variables.  This gives us tremendous power over the display of dynamic data.  In fact, it's entirely possible to elminate the need for using many different templates by placing more complex programming to act on the variables being passed to the template. ...

Control Structures

Like most programming languages, Smarty provides control structures for efficient coding. ...

Modifiers (plugins)

Smarty 'Modifiers' are little functions that are applied to a variable in the template before it is displayed or used in some other context. ...

Template Functions (plugins)

Smarty 'Template Functions' are the primary 'tags' or programming used in templates. ...

Block Functions (plugins)

Smarty 'Block' functions are functions which enclose a template block and operate on the contents of this block.  In Exponent, we use Block functions to encapsulate things like css code, the permissions section, forms, scripts, etc... ...