Call Joomla! Template Parameter From Template Override
Here's a beauty of a gem for all of you template-override-happy, parameter junkies (I'm one too!). You can call template based parameters (hint: add your own) from within a template override. This first bit was originally posted at the Joomla! forums by okonomiyaki3000:
This allows you to read the template parameters. Then you can call one of them as follows:
Now, if that's not enough fun for you, we can mix in some JavaScript. For example, we'll take a newly created redirect parameter and slap it in the middle of a redirect, resulting in:
NOTE: The Art of Web posted a nice write-up entitled "PHP: Passing variables to JavaScript that could come in handy.
Comments
Hi Jaime,
Yes, that would be nice. I haven't checked if it is in 1.6 yet, but you can always propose such things at joomla-dev-general@googleg roups.com . That's a good idea!
Best,
Matt
$tparams = new JParameter(JFil e::read(JPATH_B ASE.DS.'templates'.DS.$mainframe->getTemplate().DS.'params.ini'));
should be included in joomla core?
RSS feed for comments to this post