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.

 

Controlling Modules

Controlling Modules

Can this be used to display certain modules only to mobile visitors?  Cant seem to figure that out.

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

Re: Controlling Modules

I am so lost. It is so simple what I want to do. I have a responsive template but the menu is not working correctly for phones. I simply want to swap out the module being used to display the same menu but with a different menu module for mobile phones than what is being use to display to tablets and computers.

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

Re: Controlling Modules

Hi,

As with most things, it's simple, but only if you know how!

1 - create your 2 menu modules that you want to toggle between. Ensure each of them are published, but set them to "Menu items: none" so they DO NOT show up until the MetaMod decides to show them.

2 - create the MetaMod. Put it in the module position where you want the target modules to appear. Ensure it is published. Set it to display on ALL menu items OR whichever menu items the other menus should appear on.

3 - in the MetaMod, use the following code (assuming Joomla 1.7-3.0):

if ($core_genius->check("categorizr = mobile")) return XXX;
else return YYY;
// replace XXX with the module id to be used for mobile devices, and YYY with
// the module id to use for all other devices.


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
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10796
Newest User:
mokao3
Members Online:
0
Guests Online:
169

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