Skip to content

Instantly share code, notes, and snippets.

@Rady
Created July 20, 2016 03:28
Show Gist options
  • Select an option

  • Save Rady/dc8cbfc97babf308f96c3e65e9a569c9 to your computer and use it in GitHub Desktop.

Select an option

Save Rady/dc8cbfc97babf308f96c3e65e9a569c9 to your computer and use it in GitHub Desktop.
$article = new stdClass;
$article->text = "{loadposition footer}";
// add more to parameters if needed
$params = new JObject;
// Note JDispatcher is deprecated in favour of JEventDispatcher in Joomla 3.x however still works.
JPluginHelper::importPlugin('content',"loadmodule");
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('onContentPrepare', array('', &$article, &$params, 0));
echo $article->text;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment