Closed (won't fix)
Project:
Mobile Tools
Version:
6.x-1.14
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Nov 2010 at 22:12 UTC
Updated:
17 May 2012 at 22:15 UTC
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
Comment #1
twom commentedHi 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!
Comment #2
ryan.armstrong commentedI'll do that! Thanks. Once I get this worked in I'll post back here and tell you how it goes.
Comment #3
ryan.armstrong commentedJust wanted to let you know that I tested the dev and it is working as intended now. Thanks for the patch!
Comment #4
ryan.armstrong commentedClosing
Comment #6
jmtmay commentedIs 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!
Comment #7
jmtmay commentedComment #8
twom commentedHi,
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.
Comment #9
jmtmay commentedThank 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.
Comment #10
minoroffense commented1.x is no longer supported