esedic
2/17/2015 - 1:18 PM

Render Joomla modules with PHP & Joomla API

Render Joomla modules with PHP & Joomla API

<?php

jimport('joomla.application.module.helper');

// Render 'mod_search' module
$module = JModuleHelper::getModule('mod_search');
echo JModuleHelper::renderModule($module);  

// Render 'mod_search' module with the title 'Search'. Frame the output with the 'xhtml' chrome:
$module = JModuleHelper::getModule( 'search', 'Search' ); 
$attribs['style'] = 'xhtml';
echo JModuleHelper::renderModule( $module, $attribs );