What I would do is in your app_controller.php (if you don't have on
make it) you can create a function probably in beforeFilter to check
if it is mobile. Then you can set a variable like $this->isMobile and
see if it's true or not wherever yo need it. Just something I thought
about, maybe wait for other peoples input.
On Mar 9, 7:36 pm, DigitalDude <[email protected]> wrote:
> Hey,
>
> I'm running into a really mean problem and I have no clue how to solve
> this.
>
> In my app I let the RequestHandler check if the Request comes from a
> mobile phone. This works fine for all controllers and actions, except
> the error pages!
>
> After looking through the core code of cake and some reading in the
> cookbook, I startet to setup a file calles app_error.php in which I
> can overwrite functions like the "missingView" function, which renders
> a file calles missing_view.ctp in the /views/errors directory. This is
> the standard behaviour of cake, and that's fine for me.
>
> The params array has the layout as a value with it, and the values
> come from the core (cake/libs/view/view.php) for this special case.
>
> So the ONLY thing I would need is a way to invoke the RequestHanlder
> into my app_error.php file, check if there is a mobile request and if
> YES change the layout und the view to be rendered. Both of those
> things I already testetd (hardcoded) and they work fine.
>
> So is there ANY chance of using the RequestHanlder in the
> app_error.php?
>
> I would be so happy if that could work...
>
> Regards,
>
> DD

-- 
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
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to