detect a mobile browser via their USER_AGENT. Then, just switch the
layout from your default layout to one specifically designed for
mobile.
http://api13.cakephp.org/class/request-handler-component#method-RequestHandlerComponentisMobile
Example:
if($this->RequestHandler->isMobile()){
$this->layout = 'mobile';
}
Using the same logic you could also use themes for even more control
over how each specific view shows up in mobile vs normal.
Using Themes
http://book.cakephp.org/view/1093/Themes
Hope that helps,
Nick
On Jul 20, 11:50 am, m16u31 <leugi...@gmail.com> wrote:
> Hi im creating an apliocacion. and I need a mobile version, the mobile
> version is ok, works fine.
> but.
>
> i need and differen url for the mobile version. something like this:
>
> wwww.example.com/m/controller/action/var With /m/
> after the domain
>
> and normal version
> wwww.example.com/controller/action/var
>
> how can i do that?
>
> i tried to do something like internationalization. and
> with $this-params
>
> but it doesn't work
>
> thank and sorry for my english
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment