Archive for November 7th, 2008

Smarty plugin: module

Tagged: PHP, Programming Date: 7th, November 2008

Some time ago I wrote this useful smarty plugin wich will enable you to call method of any php class from smarty html template.
It’s very simple and it goes:

/**
* @author Vladimir Cvetic < vladimir[at]ferdinand.rs >
*/
function smarty_function_module($params, &$smarty)
{
/* Check if required params are valid */
if (!isset($params['class']))
{
$smarty->trigger_error(’Module name is not defined!’);
return false;
}
if (!isset($params['method']))
{
$smarty->trigger_error(’Method name is [...]

  • Leave Comment
  • Read Comments (0)