Skip to content

Instantly share code, notes, and snippets.

@Uriel29
Created March 2, 2019 01:06
Show Gist options
  • Save Uriel29/0f53aedefe88d9994a4d6c130865d463 to your computer and use it in GitHub Desktop.
Save Uriel29/0f53aedefe88d9994a4d6c130865d463 to your computer and use it in GitHub Desktop.
Inserir módulos dentro de componentes do Joomla. Em override! Precisei por módulos dentro do blog.php do Joomla e dentro do content, tudo em override.
<?php echo JHtml::_('content.prepare', '{loadposition home-banner}'); ?>
<?php $document = &JFactory::getDocument();
$renderer = $document->loadRenderer('modules');
$position = 'home-banner';
$options = array('style' => 'raw');
echo $renderer->render($position, $options, null);
jimport('joomla.application.module.helper');
// this is where you want to load your module position
$modules = JModuleHelper::getModules('home-banner');
foreach($modules as $module)
{
echo JModuleHelper::renderModule($module);
}
@Uriel29
Copy link
Author

Uriel29 commented Mar 2, 2019

Você pode usar esse códigos para inserir dentro dos componentes módulos. Em override.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment