Smarty

Smarty

The template engine used in Views for Magrathea is Smarty.
Smarty was choosen because it is clean, fast, quick to learn and easy to maintain.

The engine website is http://www.smarty.net/ and its documentation is also available there .

Smarty library is available inside Magrathea/libs, so, if you want to use another version or change anything on it, be my guest!

Some sample of how to load Smarty object can be found on global.php file, but, if you want some spoilers of what will be necessary to do, here it is:
	$Smarty = new Smarty;
	$Smarty->template_dir = $site_path."/app/Views/";
	$Smarty->compile_dir  = $site_path."/app/Views/_compiled";
	$Smarty->config_dir   = $site_path."/app/Views/configs";
	$Smarty->cache_dir    = $site_path."/app/Views/_cache";
	$Smarty->configLoad("site.conf");

	// initialize the MagratheaView and sets it to Smarty	
	$View = new MagratheaView();
	$Smarty->assign("View", $View);