make sure you set the variable in the beforeRender function and not in
the beforeFilter...

cheers



On Apr 8, 5:21 pm, "rich...@home" <richardath...@gmail.com> wrote:
> In my AppController, I set a bunch of view variables in the
> beforeFilter() {} callback.
>
> I use these view variables ($authUser) in the layout to for e.g. a
> welcome <username> block.
>
> If the user goes to a page that doesn't exist, then AppController
> isn't loaded at all and these view variables aren't populated which
> produces error messages all over the place :-(
>
> I realise that these errors wont show with debug 0, but neither will
> the values of the vars I've set.
>
> Where can I set these vars so that that are always available to the
> layout under all conditions?
>
> Thanks in advance :-)
--~--~---------~--~----~------------~-------~--~----~
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