Trying to set up a mobile theme in CakePHP 2.0.0-dev, but it isn t working as it did in 1.3. Have there been any changes to the themes implementation in 2.0?
Structure as follows:
app/views/themed/mobile/layouts/default.ctp
app/views/themed/mobile/pages/home.ctp
Then in app/app_controller.php:
public function beforeRender()
{
if ($this->RequestHandler->isMobile()) {
$this->view = Theme ;
$this->theme = mobile ;
}
}
Hit the home page... But no mobile site... Just the normal site. No errors, nothing in debug or error logs. No errors, no exceptions. Nothing. As if themes have been deprecated or something.
Any ideas anyone?