There are some libraries for determining the mobile browser profile -- try WURFL at sourceforge - perhaps it could be integrated with Cake via Vendors? I don't know - I haven't tried this, but was looking at it the other day. You could use it to accurately know what to serve.
hth Luke On Jun 9, 12:15 pm, Flan <[EMAIL PROTECTED]> wrote: > So far I have found the RequestHandlerComponent::isMobile() not very > reliable. It looks for expressions such as Nokia etc in the > HTTP_USER_AGENT which for some reason do not always appear. A better > approach might be a Javascript function to determine the screen size > of the client, or give the user the option to choose the layout or a > mixture of all 3 approaches. > > On Jun 9, 12:40 pm, "jitka (poLK)" <[EMAIL PROTECTED]> wrote: > > > First of all - if you're implementing constructor in your controller, > > then you have to call parent::__construct() in it. > > > You're right - you don't have to use theming - switching of layout is > > good enough in most cases. But why are you switching layout in > > constructor instead of beforeRender() callback? And also: why not use > > RequestHandlerComponent::isMobile() method? ;) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
