Hey guys, I'm using the 1.14 version of this module. I'm not doing any redirecting, as all I need the module to do is theme switching. I've got the special block appearing at the bottom of the page on my mobile theme, and theme switching is properly detecting mobile browsers and switching. But in the black I made the link that appears on the mobile page "www.blah.com?nomobile=true" but clicking on it only reloads the page with that variable attached. It doesn't actually switch the theme. Any ideas?

Comments

twom’s picture

Status: Active » Needs review

Hi Ryan,

I have updated the code, and normally nomobile=true should work now for theme switching too.

I also added some code to the dev version of the module that allows you to better control the theme switching. You can now add a query parameter ?device_group, and it can take the following values:
- ?device_group=desktop => force the desktop template to be shown independent of the requesting device
- ?device_group=mobile => force the default mobile template to be shown independent of the requesting device
- ?device_group=[device_group] => force the template that has been assigned to a device_group
- ?device_group=[any other value] => reset everything and enable the normal behavior

I hope you find some time in downloading the dev release of mobile tools and test this functionality!

ryan.armstrong’s picture

I'll do that! Thanks. Once I get this worked in I'll post back here and tell you how it goes.

ryan.armstrong’s picture

Just wanted to let you know that I tested the dev and it is working as intended now. Thanks for the patch!

ryan.armstrong’s picture

Status: Needs review » Fixed

Closing

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jmtmay’s picture

Is there anyway to get this same functionality in the 5x-dev version? I'm using the theme switching, but still want to display a link to my desktop site. I tried using http://www.domain.com/?nomobile=true, http://www.domain.com/?device=desktop and http://www.domain.com/?device_group=desktop and none will work.

Any help is appreciated!

Thanks!

jmtmay’s picture

Status: Closed (fixed) » Active
twom’s picture

Category: bug » feature
Status: Active » Needs work

Hi,

At this point the Drupal 5 version is not maintained anymore. I am happy to accept D5 patches that I can apply if somebody finds the time to work on this.

Basically backporting the D6 version to D5 should not be to hard.

jmtmay’s picture

Thank you for responding. I thought it couldn't hurt to ask. I would love to be able to do it myself, but I'm not the strongest programmer in the world. Could you tell me what part of the code in D6 does this? I downloaded the version to see if I could figure it out, but wasn't quite sure.

minoroffense’s picture

Status: Needs work » Closed (won't fix)

1.x is no longer supported