JModuleHelper and Passing in Parameters

549 views
Skip to first unread message

Jon Lackey @zuno

unread,
Dec 17, 2010, 4:09:55 PM12/17/10
to Joomla! Framework Development
Is there a way to pass in module parameters when using renderModule
like so...

$module = JModuleHelper::getModule('mod_name');
$output = JModuleHelper::renderModule($module, array('style' =>
'none'));

I've seen a few examples using $document->loadRenderer('module');, but
surely JModuleHelper can take in params.

Thanks!
-Jon

Jonathan Lackey @zuno

unread,
Dec 18, 2010, 12:45:22 PM12/18/10
to joomla-dev...@googlegroups.com
For anyone interested I found a solution for passing module parameters with JModuleHelper...

$params->set( 'parameter_name', 'value' );
$module = JModuleHelper::getModule( 'mod_name' );
$module->params = $params->toString('ini');
$output = JModuleHelper::renderModule( $module, array('style' => 'none') );

Jonathan Lackey | vp, creative director
811 N Catalina Ave, Penthouse Suite . Redondo Beach CA . 90277
t:310.372.5263 . twitter @zuno . skype: zunostudios

--
You received this message because you are subscribed to the Google Groups "Joomla! Framework Development" group.
To post to this group, send an email to joomla-dev...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-frame...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-framework?hl=en-GB.


Reply all
Reply to author
Forward
0 new messages