1
Hi,
I am using the following code in my module to render an error page if some data doesn't validate:
if($err_handler->has_errors()) {
$xoopsOption['main_template'] = 'survey_error.html';
include(XOOPS_ROOT_PATH.'/header.php');
$xoopsTpl->assign('errors', $err_handler->getErrors());
//$xoopsTpl->display('db:survey_error.html');
include(XOOPS_ROOT_PATH.'/footer.php');
exit();
}
Strange enough this doesn't render the template. When I use $xoopsTpl->display('db:survey_error.html') it does display correctly, but that is a workaround.
edit:
using $xoopsOption['template_main'] woulda helped.