Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Mobile theme profiles #18

Open
sminnee opened this Issue · 2 comments

3 participants

@sminnee
Owner

From http://open.silverstripe.org/ticket/6008

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.

@nedmas

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 (https://github.com/serbanghita/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 https://github.com/nedmas/silverstripe-mobile

@chillu
Owner

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 http://www.brettjankord.com/2013/01/10/active-development-on-categorizr-has-come-to-an-end/ and http://blog.cloudfour.com/responsive-design-for-apps-part-1/.

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.