/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php require_once(JPATH_ROOT.DS.'libraries'.DS.'joomla'.DS.'application'.DS.'module'.DS.'helper.php'); $document =& JFactory::getDocument(); $renderer = $document->loadRenderer('module'); $db =& JFactory::getDBO(); $db->setQuery("SELECT * FROM #__modules WHERE position='positionname' AND published=1 ORDER BY ordering"); $modules = $db->loadObjectList(); { foreach( $modules as $module ) { //just to get rid of that stupid php warning $module->user = ''; echo $renderer->render($module, $params); } }
URL: http://jeffchannell.com/Joomla/load-a-joomla-module-position-without-using-jdoc-tags.html