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.

Advertisements

2 thoughts on “How show joomla module in error page.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s