So here's how to manually load a module and also settings its parameters:
//load module
$document = &JFactory::getDocument();
$renderer = $document->loadRenderer('module');
$Module = &JModuleHelper::getModule('mod_adsmanager_ads_zb');
//set module params
$Params = "param1=0\n\rparam2=text here";
$Module->params = $Params;
//display module
echo $renderer->render($Module);
Note that I set two parameters and they are separated using \n\r
You can also write it in a cleaner way:
$param_separator = "\n\r"; $Params = "param1=0" . $param_separator; $Params .= "param2=text here";
No comments:
Post a Comment