Skip to content

Instantly share code, notes, and snippets.

@marcosfreitas
Created June 27, 2014 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcosfreitas/fa386b9c811f30c59e99 to your computer and use it in GitHub Desktop.
Save marcosfreitas/fa386b9c811f30c59e99 to your computer and use it in GitHub Desktop.
How to load a module created on Joomla calling by the name and title.
<?php
/**
* Carregando um módulo pelo nome
*/
if(!empty($anunciante_gk5)):
$modName = "mod_news_pro_gk5";
$modTitle = $anunciante_gk5;
$document = JFactory::getDocument();
$renderer = $document->loadRenderer('module');
$mod = JModuleHelper::getModule($modName, $modTitle);
$options = array('style' => 'sp_flat');
echo $renderer->render($mod, $options);
endif;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment