I was wondering how the following is accomplished: I have a static table view that's displayed in all my pages that's pulling data from one of the models I've created. I was wondering what the best way to solve this problem is.
I first attacked the problem by including the model in the $uses var in the app_controller.php file. I then set the data by calling the $this-Model->findBySomeParameter() function in the beforeFilter array so that this would be called for every controller in the inheritance tree. However, all subsequent controllers would have to override the $uses variable anyway, to include itself - which I didn't really like. I then read up on Elements, but I wasn't sure if this is the way that such a table would be called... and if it is... would I have to include this code in every controller. I'm trying to find a way to make use of the inheritance in the controllers... anybody else have any ideas? It's currently working in the above situation, but I don't like how the $uses var has to be explicitly set in each subsequent controller. Thanks, Ryan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
