If we are using an iframe (wrapper) within our content we sometimes need to pass Joomla parameters to the called page.
By using Joomla's template override system we don't have to touch any core files.
First of all create the needed folder structure in your own template folder.
So in this case it would be
Then copy into the the new wrapper folder the file
Now we need to make a few changes to this file that we have copied.
Directly under line 2 (file access check) add this -
$user =& JFactory::getUser();Then at line 24 change the code to read -
src="<?php echo $this->wrapper->url."?username=".$user->username."&email=".$user->email; ?>"In this case it will append the username and email address of the logged in user to the iframe url like so -
The parameters can be pulled by normal $_GET["email"] or $_REQUEST["email"] variables in the target page and used as you want.
|Last Updated on Monday, 19 October 2009 15:25|