Pages

Monday, July 25, 2011

Set your Joomla Module in Component in Joomla

<?php
jimport('joomla.application.module.helper');
// this is where you want to load your module position
$modules = JModuleHelper::getModules('MODULE-POSITION');
foreach($modules as $module)
{
        echo JModuleHelper::renderModule($module);
}
?>

You can set joomla modules in your joomla components by setting this code. only you have to put this code in component where you want to saw you Joomla module and only set position in 'MODULE-POSITION'.

2 comments:

  1. Great posting.Great information about Joomla modules.It explained how to set the modules in Joomla.It is very useful to me to do it.Thanks for making it.
    Joomla developer

    ReplyDelete
  2. Straight forward post. Your blog is very nice. Keep it up. http://atpatil.blogspot.in/

    ReplyDelete