How show joomla module in error page.

In error.php page, you need to import the module helper. This can be done by adding this code

jimport( ‘joomla.application.module.helper’ );

Normally we defined module in index.php file jdoc:include type=”modules” name=”menu”
But in error.php it will not work. In error.php you need to call module:

$module = JModuleHelper::getModule( ‘menu’ , ‘Main Menu’ );
$attribs[‘style’] = ‘xhtml’;
echo JModuleHelper::renderModule( $module, $attribs);

where menu = type of the module and
Main Menu = name of the module not ttile.