Smarty is a template system written in PHP. It separates the PHP code from the HTML layout.


The Smarty libraries are accessed via the wrapper class eaSmarty located in code/base/smarty.class.php. The wrapper provides not only basic set-up procedures, but also localization functionality.

The templates for the ea-Geier are stored in html/.

The localization data is stored in ini files in lang/de/ or lang/en/ respectively.


A basic template (html/dummy.tpl):

{include file="dummy.ini"}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
   <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />

<body> {* This is a little comment that won't be visible in the HTML source *}


</body><!-- this is a little comment that will be seen in the HTML source -->

An appropriate localization file (lang/en/dummy.ini)

fixedTextToBeLocalized=TITLE: This is the Smarty basic example ...

And its integration into PHP:


$smarty = new eaSmarty();

$smarty->assign('body_text', 'BODY: This is the message set using assign()');


See the Reference Guide for a complete list of commands.


In addition to the native Smarty functions the ea-Geier provides the following constructs:


The Smarty library will be bundled with production releases.

But as 3rd-party product it will not be checked into the repository.

If the Smarty code is missing in your ea-Geier distribution, please download it from the Smarty homepage.

Unzip the code into the 3party/smarty/ folder – e.g.:


and make sure the eaSMARTY_DIR definition is configured properly. To do this, open the the file code/config.php. Look for eaSMARTY_DIR and change the value to the name of the folder you have just uploaded – e.g.:

define('eaSMARTY_DIR', '3party/smarty/Smarty-2.6.18/');