How do I access the Global configuration parameters?
Posted: Fri Mar 21, 2008 8:46 am
I am building a component on Joomla! 1.5 and have two questions:
1. How do I access global configuration parameters?
I tried the following from within the Model
but it did not work as I had anticipated. Object seemed empty.......Maybe I did not call it properly.
2. How do I compare the global parameters with the parameters of the article itself. (best practices)
I know they are stored in the #__content.attribs, but is there already a function in the framework to load the into an array or, preferably, an object? Or should I use some combination of explode() and regular expressions?
1. How do I access global configuration parameters?
I tried the following from within the Model
Code: Select all
global $mainframe;
$params = &$mainframe->getParams();
2. How do I compare the global parameters with the parameters of the article itself. (best practices)
I know they are stored in the #__content.attribs, but is there already a function in the framework to load the into an array or, preferably, an object? Or should I use some combination of explode() and regular expressions?