Swapping Controller For Mobile Experience


#1

Is it possible to serve up a separate controller for users visiting the site from a mobile device?

Basically, I have an application which has a mobile design that alters the behavior enough that I need to abstract my controllers/views/components into a base class, and extend those classes for a Desktop, and Mobile Version. Has anyone done this before, and or know how it can be done?


#2

You can specify a controller with setupController inside your route. So just have an if statement that uses jquery to detect mobile devises to dictate which controller you want to use.