add Smarty templating