Mobile Version of Coldbox Site

Is there any tried and true successful method to making a mobile
version of the site. We are imaging rewriting our views, but would
like to keep the handlers and model the same. Is there a way to set a
route for mobile devices that will map to the existing handlers
(e.g., /m/ ) ?

Yes via ses mappings. So you can switch the layouts

I am doing a similar thing with my site (re: allowing mobile views of
my CB3 app).

I use the same models and the same handlers. This is what I did.

When the app is called up - there is a script that determines if it's
being called by a mobile device.

After it determines this to be true then I set a flag within the CB3's
session scope that can be referenced throughout the app.

Each index of each handler checks this session "flag". If it's set to
"true", then it sets the next view appropriately.

Thus, I am using the same handlers and same models.

The only issue I had - was the default layout. Unfortunately, I had
to have each mobile version page call a "mobile layout" to override
the "default" layout that is set within the config file. But, it's a
small issue. I viewed the "mobile layout" issue as a "null issue".

Does this answer your question?

- Russell

I’ve often used an interceptor to evaluate the request.

I set a flag to know if its mobile, web or AJAX.

Thanks Rus and Luis. So the impression I'm getting is using an "if"
"then" catch for all the handlers to check for the mobile flag and
then if its set to mobile point it to the mobile view.

I'm wondering how this relates to using a custom route ("http://"). Is there a "pre-render"
capability to catch a view if mobile is "on" and then show the mobile
version if available?