web design, England, Britain, UK, belgium
 

How to pass Joomla 1.5 parameters to an iframe (wrapper) page - Joomla & VirtueMart Tips & How To's

How to pass Joomla parameters to an iframe (wrapper) page by using the Joomla 1.5 Templates Override system.

Home Joomla VirtueMart Tips How to pass Joomla 1.5 parameters to an iframe (wrapper) page

Thu

23

Apr

How to pass Joomla 1.5 parameters to an iframe (wrapper) page
  • Joomla 1.5
  • com_wrapper

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.

Joomla template overrides First of all create the needed folder structure in your own template folder.
So in this case it would be
joomla_root/templates/your_template/html/com_wrapper/wrapper .

Then copy into the the new wrapper folder the file
joomla_root/components/com_wrapper/views/wrapper/tmpl/default.php

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 -
 
<iframe id="blockrandom" class="wrapper" height="500" frameborder="0" width="100%" scrolling="auto" align="top"
src="http://www.gjcwebdesign.com/joomla-15-virtuemart-11-joomfish-20.html?username=Bert.&email=
 This e-mail address is being protected from spambots. You need JavaScript enabled to view it
 " name="iframe">
 
You can send the other parameters such as real name, user id etc as well as session parameters.
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
 
VirtueMart
Your Cart is currently empty.

Latest Joomla & VirtueMart Tips

See all tips & examples



How to pass Joomla 1.5 parameters to an iframe (wrapper) page|Joomla & VirtueMart Tips & How To's



How to pass Joomla parameters to an iframe (wrapper) page by using the Joomla 1.5 Templates Override system.


wrapper, email, user, joomla, parameters, file, username, folder, template, case, line, using, iframe, url, page, root, getuser, append, jfactory, change, code, read, src, like, request, normal, variables, target, used, pulled, session, add, logged, send, real, address, php, core, touch, files

|

We use cookies to improve our website and your experience when using it. Cookies used for the essential operation of the site have already been set.
To find out more about the cookies we use and how to delete them, see our privacy policy.

I accept cookies from this site.