Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Joomla 2.5, Accessing template parameters in component's template

What is the correct way to access template parameters in components template in Joomla 2.5?

There are something implementations for earlier versions of Joomla but not for 2.5. http://forum.joomla.org/viewtopic.php?p=2166990#p2166903

like image 422
Roger Wayne Avatar asked Jul 15 '12 15:07

Roger Wayne


1 Answers

I think this might be what you're looking for:

$app        = JFactory::getApplication();
$template   = $app->getTemplate(true);
$params     = $template->params;
$variable   = $params->get('variable');
like image 64
GDP Avatar answered Oct 21 '22 22:10

GDP