Smarty is an actively used programming language created in 2006. Smarty is a web template system written in PHP. Smarty is primarily promoted as a tool for separation of concerns. Smarty is intended to simplify compartmentalization, allowing the front-end of a web page to change separately from its back-end. Read more on Wikipedia...

13Years Old 525Users 2Jobs
  • Smarty ranks in the top 5% of languages
  • the Smarty website
  • the Smarty wikipedia page
  • Smarty first appeared in 2006
  • file extensions for Smarty include tpl
  • See also: php, isbn, twig
  • I have 41 facts about Smarty. what would you like to know? email me and let me know how I can help.

Example code from Wikipedia:

define('SMARTY_DIR', 'smarty-2.6.22/');
require_once(SMARTY_DIR . 'Smarty.class.php');

$smarty = new Smarty();
$smarty->template_dir = './templates/';
$smarty->compile_dir = './templates/compile/';

$smarty->assign('title_text', 'TITLE: This is the Smarty basic example ...');
$smarty->assign('body_html', '<p>BODY: This is the message set using assign()</p>');


Last updated August 22nd, 2019