Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

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

 

How configure MetaTemplate for template switch with 2 domains?

How configure MetaTemplate for template switch with 2 domains?

Hello!
I just downloaded MetaTemplatePro but I'm stuck.
Despite the posts I read, I can not configure MetaTemplatePro swtich to create a template based on the url.
Let me explain:

If the first visitor (A) come from the site domain01.tld then he will see the template "design01"
If the second visitor (B) come from the site domain02.tld he will see the template "design02"

My website is a virtuemart shop

I tested this code in the php block:

Code:


$ Ref = $ _SERVER ['HTTP_REFERER'];

if ($ ref == 'http://www.domain01.tld')
   return "design01";

Same result with template Beez or Rhuk-Milkyway.

Thank you for your help,

Thomas

smartbelkin
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: How configure MetaTemplate for template switch with 2 domains?

Hi Thomas,

since you are using MetaTemplate PRO, you don't need to use PHP for this smile

You can just use the "Referrer" box in the "Environment" section of the interface.

* Find the Referrer section
* Set the drop-down to "starts with"
* Enter "http://www.domain01.tld/" into the text box
* Then select "design01" with the drop-down box in the SUCCEED action.

Simple smile

If you want people coming from the other URL to see the second template, then just make a second rule in the rule chain, and set it up the same as the first one, except with the different referrer URL.

Best regards,
Stephen

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

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Re: How configure MetaTemplate for template switch with 2 domains?

Hi Stephen
thank you for your quick response
Indeed it was super simple, I am almost ashamed  roll
Sincerely,

Thomas

smartbelkin
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1685
Total Polls:
6
Total Posts:
5940
Posts this week:
1
User Info:
 
Total Users:
5193
Newest User:
david2398
Members Online:
1
Guests Online:
108

Online: 
Technichem

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked