Created
June 13, 2016 11:36
-
-
Save jbanety/48e50d3c0a1892b51051ac6287496715 to your computer and use it in GitHub Desktop.
Render joomla modules in templates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _load($position, $style = 'none') { | |
$document = JFactory::getDocument(); | |
$renderer = $document->loadRenderer('module'); | |
$modules = JModuleHelper::getModules($position); | |
$params = array('style' => $style); | |
foreach ($modules as $module) { | |
echo $renderer->render($module, $params); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment