0

I have a project where I need to be able show a html item on a page depending on what the domain is.

What I want to be able to do is call the component site wide (front end) so that it is basically hooking in on every page load.

Sounds a little complicated but really need it too run

Essentially I have two domains both linking to the same install of joomla. When a user visits domain X I don't want to see a particular over lay, but when a user visits domain Y then I want the component to kick in, put in the html and also insert an extra parameter into the url.

1 Answers1

0

Just test for the server name against JURI::base(false) and set the new var with JRequest::setVar('newparam','newvalue'); But where do you need this var? it may not be available depending on where you set it: i.e. if you set it in a module it won't be available to the component

Riccardo Zorn
  • 5,590
  • 1
  • 20
  • 36
  • Thanks for reply! Basically what I wanted to do was: URL X - the normal domain goes to as usualy URL Y - the addon x.com/info.html y.com/var/info.html both would serve the same content but the Y would have the extra overlay - var in Y would be a unique identifier queried in the database to give information to the overlay... – user2163730 Mar 14 '13 at 00:45