
I wanted to offer a 'lighter' theme for mobile visitors so I tried out the Mobile Tools module http://drupal.org/project/mobile_tools
I got it to work for me after I made some customizations.
It is very good module that has a lot of options...
The method that appealed to me the most was an option to display a block asking the user if they would like to switch. It even detects if its a mobile user browsing the desktop version. That way you don't have to have the block up all the time.
The trouble was that that block basically just does a redirect to your mobile URL. I don't have a mobile URL.
So then I tried out the option that automatically switches the theme for your site. No separate URLs. Sweet.
But what if the mobile visitor wants to see the desktop version? No option for that...
So I hacked together a form that asks the user just that question.
I took out the URL stuff from the existing block and replaced it with my form.
I had to put some logic in to set/check a variable to make sure I was always displaying the theme they wanted.
Tada! best of both.
Let me know if you would like my code...
Comments
Thanks So much for share your code, very helpful for not than skilful people like me, you did the work and save us some headaches
erezioni
Post new comment