How do I use the mobile theme if the $_SERVER['HTTP_USER_AGENT'] is mobile, and use the desktop theme if it is desktop?
Tell me more
×
Drupal Answers is a question and answer site for
Drupal developers and administrators. It's 100% free, no registration required.
|
|
||||
|
|
|
I would suggest you to use browsecap module to detect what browser users use and switchtheme module to switch to correct theme depending on the browser they use. |
|||
|
|
|
The mobile tools module also integrates with the browscap module as well as the wufrl module, though I recommend starting with browscap instead of wufrl. Wufrl is more complicated to set up and also not open source anymore. Mobile tools gives you some handy options like choosing different themes for iPhone vs. Android vs Nokia, Panels module integration, special (optional) permissions for mobile users, and other options. You can also force mobile users to use the mobile theme or let them choose between mobile and desktop a la the switchtheme module. |
|||
|
|