Actions

Talk

Difference between revisions of "Creating component preferences"

From Joomla! Documentation

(New page: If you have an extension that uses plugins and a component, how do you access these component parameters in the plugin? I know that plugins can have their own parameters, but it would be ...)
 
Line 1: Line 1:
 
If you have an extension that uses plugins and a component, how do you access these component parameters in the plugin?  I know that plugins can have their own parameters, but it would be good to consolidate them all in one place.  So adding an example of how to access these component parameters from some other extension code would be very useful.
 
If you have an extension that uses plugins and a component, how do you access these component parameters in the plugin?  I know that plugins can have their own parameters, but it would be good to consolidate them all in one place.  So adding an example of how to access these component parameters from some other extension code would be very useful.
 +
 +
The method cited to obtain the parameter values for use in the component (&$mainframe->getParams() ) is not working for me.  However, use of JComponentHelper::getParams('componentname') does work.  Remember to include the JComponentHelper file with jimport('joomla.application.component.helper').

Revision as of 10:38, 12 February 2008

If you have an extension that uses plugins and a component, how do you access these component parameters in the plugin? I know that plugins can have their own parameters, but it would be good to consolidate them all in one place. So adding an example of how to access these component parameters from some other extension code would be very useful.

The method cited to obtain the parameter values for use in the component (&$mainframe->getParams() ) is not working for me. However, use of JComponentHelper::getParams('componentname') does work. Remember to include the JComponentHelper file with jimport('joomla.application.component.helper').