Wednesday, May 2, 2012

Show a particular joomla module in external file

Show a particular joomla module in external file

Show a particular module in external file



define( '_JEXEC', 1 );
define('JPATH_BASE', dirname(__FILE__));
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();
jimport( 'joomla.application.module.helper' );
$module = JModuleHelper::getModule('banners');
$document = &JFactory::getDocument();
$renderer = $document->loadRenderer('module');
echo $renderer->render($module);

No comments:

Post a Comment