LearnWebDesignOnline.com is proudly hosted by Hostmonster.com

When creating a custom Joomla template or doing custom Joomla development, you may need to know what configuration parameters the admin has set in the Joomla administration control panel.
For example, the administrator could have set the media path (via Administrator -> Site -> Global Configuration -> System) to any path on the server...

As template developers writing PHP code, we my need to retrieve this value.
To retrieve configuration parameters, Joomla provides us with the JComponentHelper::getParams() method (see reference) which takes the component name.
In our case, we want JComponentHelper::getParams('com_media'). If you do a print_r of the returned value, you will see that it contain a whole bunch of information. The piece of information that we are looking for is highlighted.

to access that piece of information, we do ...
JComponentHelper::getParams('com_media')->get('file_path');
