Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Mobile theme profiles #18

sminnee opened this Issue · 2 comments

3 participants



Allow for a ComplexTableField? so people can define which devices should receive a mobile theme. This would mean you can define a number of different themes for different devices.

For example:

Opera mobile, iPhone goes to "mymobiletheme" iPad and Dell Streak go to "mytablettheme"

Any mobile devices that don't belong in a profile would go to full site.

We should also allow an easy way for site developers to set their own mobile devices in the profile checkbox lists, as the default ones won't cover all mobiles by far.

We could also allow for all non-popular mobiles to go to another theme (or an existing one), so there's a fallback for old Nokia phones, for example.


So for a recent client project I needed to be able to config which devices displayed a mobile site and which didn't. My solution was to switch out the current device detection and replace it with Mobile_Detect ( and let the user set which rules to use when checking if a device is a mobile.

I know it doesn't provide everything discussed above, but I was wondering if anyone had any feedback/suggestion as to this being a possible start to solving this issue?

Here's my code so far


Note: I've added some rudimentary is_tablet() detection with e4d2600 and cca2096. Its no less hacky than the current detection, but allows for some basic logic switching. In the end, the whole approach of user agent detection is flawed, which I've also noted in the README. Its technically impossible to distinguish a "tablet" running Windows 8 from a "desktop" doing the same thing (or a tablet with a wireless keyboard, sitting on a desk ... you get the point). See and

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.