something like this should work (from modelbaker...)

        var $components = array(
                'RequestHandler'
        );



        function beforeFilter() {
                if ($this->RequestHandler->isMobile() ||  
stripos($_SERVER['HTTP_USER_AGENT'],'Android')) {
                        if ($this->RequestHandler->isAjax()) {
                                $this->layout = 'ajax';
                        } else {
                                $this->layout = 'iphone';
                        }
                        $this->mobileView = '.iphone';
                }
        }

On Feb 9, 2009, at 2:25 PM, monirr444 wrote:

>
>
> i made an iphone version of my site is there any way to put a code  
> in my
> index.ctp whenever iphone users go there redirect them to iphone  
> version  or
> any other solutions
>
> thank You
>
> -- 
> View this message in context: 
> http://n2.nabble.com/iphone-version-of-my-site-tp2298939p2298939.html
> Sent from the CakePHP mailing list archive at Nabble.com.
>
>
> >

Andras Kende
http://kende.com




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to