Sometimes we need to display a module between the content of our component, Joomla doesn’t provide the functionality to assign location in a component in template file. therefore we need to add some custom code to display a specific module at that position.
Code
//first of all import module helper file
jimport(‘joomla.application.module.helper’);
// give the name of module in the function
$module = JModuleHelper::getModule(‘mod_jevents_latest’);
JModuleHelper::renderModule($module);
echo $module->content;