Skip to content

Instantly share code, notes, and snippets.

@mt3o
Created May 10, 2019 18:41
Show Gist options
  • Save mt3o/ee0feb10314ab082635ec1f364156bf5 to your computer and use it in GitHub Desktop.
Save mt3o/ee0feb10314ab082635ec1f364156bf5 to your computer and use it in GitHub Desktop.
Echo joomla modules with php
<?php
// https://joomla.stackexchange.com/questions/1054/displaying-a-joomla-module-using-php
$modules = JModuleHelper::getModules("dashboard_main");
$document = JFactory::getDocument();
$attribs = array();
$attribs['style'] = 'xhtml';
foreach ($modules as $mod)
{
echo JModuleHelper::renderModule($mod, $attribs);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment