Well, it looks like my first EE project is quite an ambitious one, it’s also my first “mobile-first” responsive design.
If anyone is new to this check these out these resources:
http://www.lukew.com/ff/entry.asp?933
http://www.alistapart.com/articles/responsive-web-design/
http://www.slideshare.net/yiibu/pragmatic-responsive-design
http://www.slideshare.net/yiibu/adaptation-why-responsive-design-actually-begins-on-the-server
Anyway, back to the subject at hand. Looking around I haven’t found any practical information on EE and mobile first design. There are addons and info for providing content to mobile devices. There are guides on creating a separate mobile site based on the same data source. But, I have yet to find something practical on getting EE to different content via the same templates based on dynamic server provided variables. So, some brainstorming seems wise.
What have you tried? What works, or doesn’t?
Here’s my thoughts so far - primarily at a high level. Rewrites are used to force the user to load a certain php file. This file checks if the user has a profile cookie, if cookies are supported, and then sets one. The file then passes control to EE to load the correct destination template. A snippet at the top of every template reads the profile cookie, and loads the enhanced design if the cookie indicates that the user’s browser supports it. If no cookie exists, or browser capability is limited, then the default (mobile-first) design is loaded.
On second thought, perhaps there’s an early hook that can be used to run this ‘profiling’.
Anyone else like to add their two cents? Feel free to tell me I’ve got it all wrong. 😉