I have created a component and need to get a constant value in the component administrator and list the item according to it. I have tried different ways to get the constant value in the
display() function in 'view.html.php'. I am expecting the value will be available in the default.php with
I have defined the constant in the configuration.php file, a URL is supposed to be define.
define('CONSTANTVALUE', 'the URL string');
$config = JFactory::getConfig(); $constantvalue = $config->get('CONSTANTVALUE'); $this->constantvalue= $constantvalue;
Seems this is not working. Then, I have tried:
That is also not working.
I have referred to this thread, https://stackoverflow.com/questions/21702981/joomla-3-how-to-get-value-from-configuration-file
How can I get the constant from configuration to component view file?