How to get the params value of plugin in the component area in joomla2.5?

Mohammed Nagoor picture Mohammed Nagoor · Oct 31, 2012 · Viewed 11.1k times · Source

I have tried to get the plugin params in the component area, but i didn't get the result.

Is there anyway to get the values.

Answer

Irfan picture Irfan · Oct 31, 2012

May this will help you- Read more

JPluginHelper::getPlugin($type, $plugin) //It will return the plugin

For Example-

$plugin = JPluginHelper::getPlugin('authentication', 'ldap');
//$params = new JParameter($plugin->params);//backward compatibility
$params = new JRegistry($plugin->params);//Joomla 1.6 Onward
echo $params->get('param_name','default_value');

$params will function like normal JParameter object and enable you to get values.

Note: Use JRegistry Instead of JParameter