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); $output = $smarty->fetch($file); $extraoutput = ''; if ($smarty->template_exists($additionalTPLFile)) { $extraoutput .= trim($smarty->fetch($additionalTPLFile)); // Allow override param to replace default text e.g. {hlp id='foo' override=1} if ($smarty->get_template_vars('override_help_text')) { $output = ''; } } exit($output . $extraoutput); } } }