1
Antoine
Scope problem?
  • 2005/7/11 13:52

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


Hi,

I am using the following code in my module to render an error page if some data doesn't validate:

le="color: #000000"><?php 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.

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits