adapt code to work with Smarty 3+