assign('id', $args['id']); CRM_Utils_Array::remove($args, 'file', 'class_name', 'type', 'q', 'id'); foreach ($args as &$arg) { $arg = strip_tags($arg); } $smarty->assign('params', $args); $extraoutput = ''; if ($smarty->template_exists($additionalTPLFile)) { //@todo hook has been put here as a conservative approach // but probably should always run. It doesn't run otherwise because of the exit CRM_Utils_Hook::pageRun($this); $extraoutput .= trim($smarty->fetch($additionalTPLFile)); } exit($smarty->fetch($file) . $extraoutput); } } }