Wednesday, November 23, 2011

Joomla: access plugin configuration params from different plugin

Sometimes it may be necessary that you need to access xml configuration parameters of plugin from within another plugin. in joomla you can achieve this quite easily. Suppose you a content plugin called "linkmanager" and you want to be able to access and use the xml configuration parameters of "linkmanager" in another plugin called "searchmanager". in "searchmanager" plugin's class constructor, you do the following to get the configuraton parameters of linkmanager.


  •   $plugin = &JPluginHelper::getPlugin('content', 'linkmanager');                 
  •   $this->params->loadObject(json_decode($plugin->params));