Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.



Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.


Template change based on previous browser url visited

Template change based on previous browser url visited

I don't know where I read this, but it seems it's possible to change the template based on a previous page, or previous url (in my specific case)
Could you confirm ? Could you also help me for setuping this rule ?
It might be based on http referer ? (but as far has I get it it seems not very stable solution...)
Maybe with a cookie so ?

Thanks for your help !

Edited By: agussol
23-Feb-12 09:50:05

Beginner Modder
5 Posts
Administrator has disabled public posting

Re: Template change based on previous browser url visited

HI agussol,

yes, you could do it based on referrer. That's pretty reliable (although it can be spoofed) as long as you want to detect exactly the previous page before the current page.

i.e. if you want to detect that someone has visited a certain page/url at any time in the current session, then you are right, you need cookies or a session variable.

So I will assume that that is what you want, to detect that a person has visited a certain URL on your site, and remember this for the rest of the session.

Rule 1: detect the URL. For the action, "set session variable A", then continue to next rule in chain.
Rule 2: detect session variable A. If found, in the succeed action, set the required template.

That way, as soon as someone visits the page in question, this sets the session variable. Then rule 2 can pick that up and will set the template every time a page is requested and that session variable is found.

Best regards,

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

3330 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
Total Topics:
Total Polls:
Total Posts:
Posts this week:
User Info:
Total Users:
Newest User:
Members Online:
Guests Online:

There are no members online

Forum Legend:

 New Sticky