Friday, March 26, 2010

Themes for Mobile

Just an 'aha' or a 'well duh' moment (depending on how you look at it), but I realized today that I could set up a theme for 'mobile' friendly display.

So, I create my new mobile theme and adjust the views accordingly.

Then in my index.php I run a check for known mobile browsers against the $_SERVER['HTTP_USER_AGENT'] and if found, I set $config to /protected/config/mobile.php instead of main.php

Primary difference being the theme set, though I imagine I might add a few other differences over time.