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.

 

Use different template and modules for mobile access

Use different template and modules for mobile access

I just purchased a license for Chameleon, and I already have a license for MetaMod Pro.  I would like to know if there is a way to utilize these two together to do the following:

I have a website using a YooTheme template (Cloud) which is not a responsive template.  I want to use the new YooTheme template "Sphere" for mobile devices, as it is fully responsive.  The problem I have is that the module position names are exactly the same for both templates, making it difficult to separate out modules for the desktop site from a much more limited set of modules I want on the mobile version.  For example, I have an upcoming events module (based on JEvents) on the desktop site.  I want to have a different upcoming events module (formatted differently) on the mobile site.  I have some modules showing on the desktop version that I do not want to show on the mobile version.

Is there a way to use Chameleon in conjunction with MetaMod Pro to accomplish this?

Thanks!!!
Rick

momentis
Web Developer
Beginner Modder
ranks
useravatar
Offline
12 Posts
User info in posts
Administrator has disabled public posting

Re: Use different template and modules for mobile access

Actually, upon reading some other posts and looking at the extension, I am sure that Chameleon will allow me to switch templates.  What I need to know is how I can unpublish some modules and publish others when a mobile device is detected.

momentis
Web Developer
Beginner Modder
ranks
useravatar
Offline
12 Posts
User info in posts
Administrator has disabled public posting

Re: Use different template and modules for mobile access

Here's what I'd do.

Let's say that both templates have a module position called "left". And you want different modules in that position based on which device is detected (which is the same criteria used to determine the template to be used).

1 - put all the modules you want for the mobile template into a module position called "left-mobile" instead of "left".
2 - put all the modules you want for the desktop template into a module position called "left-desktop" instead of "left".
3 - into the "left" position, put a single MetaMod module, and no other modules. In that module, use the following rule:

if ($core_genius->check("categorizr = mobile")) return "left-mobile";
return "left-desktop";

What this does is when the "left" position is being rendered, the MetaMod will get run. If it detects that you are on a mobile site, it will take any/all modules from the left-mobile position and put them into the "left" position. If it's not mobile, then it will take everything from the "left-desktop" position and do the same thing with them.

The nice thing about this is that you can then assign modules to either left-desktop or left-mobile depending on where you want them to show up, without having to touch the MetaMod at all. It just acts as the switch.

Hope that helps,
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
3312 Posts
User info in posts
Administrator has disabled public posting

Re: Use different template and modules for mobile access

Oh, that makes sense.  And I can do this for any combination of positions (innertop-mobile/innertop-desktop)! 

Thanks - I will give this a try and report back!!!

Rick

momentis
Web Developer
Beginner Modder
ranks
useravatar
Offline
12 Posts
User info in posts
Administrator has disabled public posting

Re: Use different template and modules for mobile access

this is what I do. go to your cPanel and zip up the template files on your main site. download them to your computer and rename the folder and files... templatename_mobile. you will need to change that in the xml and the language file and inside the xml change the name reference inside there and the name reference to the language file. also change the language file. upload the template through joomla extensions. then create a mobile menu and assign the new mobile version of the same template to the mobile menu. modify your template to fit on only smart phones. tablets should see your main site fine and phones less than a smart phone will only display text. place your modules only above and below the content. load position works inside content items in the mobile browser.. I use it.  then use the switcher to only switch the iphone and android phone.

this menu system has a responsive template for the menu. http://www.joomlack.fr/en/joomla-extensions/maximenu-ck

maryswave
Beginner Modder
ranks
useravatar
Offline
10 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1667
Total Polls:
6
Total Posts:
5909
Posts this week:
1
User Info:
 
Total Users:
10137
Newest User:
lexispoker1
Members Online:
0
Guests Online:
330

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