Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » Chameleon / ChameleonLite
- » Chameleon
- » Template change based on previous...
Template change based on previous browser url visited
Template change based on previous browser url visited
Hello,
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 !
23-Feb-12 10:50:05
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
- Index
- » Chameleon / ChameleonLite
- » Chameleon
- » Template change based on previous...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5944
- Posts this week:
- 2
- User Info:
- Total Users:
- 7667
- Newest User:
- humble2601
- Members Online:
- 0
- Guests Online:
- 216
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked