references:joomla.framework:document:jdocumenterror-renderrender
Renders the error document. Pushes the error message and debug information and loads the appropriate template for the specified error code. The following elements can be set in $params:
Syntaxvoid render ( $cache, $params )
ExamplesThe JError::customErrorPage invokes this method in the following manner: Example $document = & JDocument::getInstance('error'); $config = & JFactory::getConfig(); // Get the current template from the application $template = $mainframe->getTemplate(); // Push the error object into the document $document->setError($error); @ob_end_clean(); jimport('joomla.i18n.language'); $document->setTitle(JText::_('Error').': '.$error->code); $data = $document->render(false, array ( 'template' => $template, 'directory' => JPATH_THEMES, 'debug' => $config->getValue('config.debug') )); Discussion |


