Oneness - True Faith
Tags: Wiki  Web-Design  Xoops  Html  MySql  PHP  Smarty  Templates  Themes 
   [Wiki A Zine :: Wiki-Main-Index :: This page]

Smarty

Quote:

Smarty is a web template system written in PHP. Smarty separates PHP, as a business logic, from HTML, a presentation logic, and generates web content by the placement of special Smarty tags within a document (i.e. variable substitution).

Tags are directives for Smarty that are enclosed by delimiters. These directives can be variables, denoted by a dollar sign ($), functions, or logical or control flow statements. Smarty allows PHP programmers to define functions that can be accessed using Smarty tags.

The compartmentalization created by Smarty allows the presentation of a web page to change separately from the back-end, thus allowing applications to be developed in a more organized fashion. Using this development model, designers are hidden from the back-end coding and PHP programmers are hidden from the presentation coding.

Smarty allows template programming with several built in features, like:

  • regular expressions
  • foreach, while
  • if, elseif, else
  • variable modifiers - For example {$variable|nl2br}
  • user created functions
  • mathematical evaluation within the template
  • Last modified: 08.03.07 by wizanda