Search code examples
joomlajoomla2.5joomla-extensions

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


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.


Solution

  • 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