1

I am building a cakephp app - its a food recommendation service. and i would like to have mobile views for that.

i just wanted to know of the best practise on how it can be done.

Problem is i will have to feed mobile views and city also

i wil have few cities which

so to address a City 1

its will be either city1.website.com or website.com/city

now i wanna have mobile views with this too. so

it has to either be m.site.com or site.com/m/

so how is it done the best way. and how to code it in cakephp ?

Harsha M V
  • 54,075
  • 125
  • 354
  • 529

2 Answers2

2

There is a great tutorial for Cake 1.2 here that should not be too difficult to port over:

http://madething.org/post/661607317/mobile-browser-detection-and-optimization-in-cakephp

Basically you detect the mobile device within beforeFilter(); and use this to serve mobile optimized layouts.

neopickaze
  • 981
  • 8
  • 14
1

You might want to look at this question and my answer. It might be just what you need.

CakePHP website mobile version

Community
  • 1
  • 1
Dan Berlyoung
  • 1,639
  • 2
  • 17
  • 36