Im trying to buil a mobile version of my website, usign Cakephp and JQueyrMobile. For the Cakephp part i opted to use the following in app_controller:
if($this->RequestHandler->isMobile() || isset($this->params['url']['mobile'])) {
$this->layout = 'mobile';
$this->isMobile = true;
}
$this->set('is_mobile', $this->isMobile);
if($this->isMobile) {
$this->action = 'mobile/'.$this->action;
}
Thank i create the /mobile/ folder for every controller/view and it works fine. I just have a problem with the home.ctp ! i created the alternative mobile version in /views/pages/mobile/home.ctp but it loads the /views/pages/home.ctp.
What should i do in order to redirect to the mobile version of home.ctp usign the code above ? Thanks!