Get Module Parameter Anywhere in component : Joomla 2.5

To use module parameters inside any of the component helper/view/model file of Joomla 2.5 , You can use below code :

         jimport( ‘joomla.html.parameter’ );
        jimport( ‘joomla.application.module.helper’ );
        $module = JModuleHelper::getModule(‘mod_name’);
        $moduleParams = new JRegistry();
        $moduleParams->loadString($module->params);
        $parama= $moduleParams->get(”parameter_name);

Hope above code will help you to component customization as per your requirement .

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>