> Don't use $this->ModelName in AppController::beforeFilter() as this
> method is called also when cake is rendering error page (404 in
> production and +various other in development) an in this case models
> aren't attached.
good point.
an alternative would be to place this inside beforeRender()...
j
>
> function beforeFilter() {
> loadModel('Cat');
> $Cat =& new Cat();
> $this->set('navdata', $Cat->generateList());
> }
>
>
> >
>
--
jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---