The line that has to be drawn here is not easy to see, I hope I can make my opinion clear without using too much words (long explanations are more confusing than helpful).
A view should not be able to set any kind of data whatsoever - because it is a _view_. I would tackle your described problem in a way that the controller has to make sure that the called view gets access to all the required data. The controller knows/determines which view to use, as such it also has to ensure the availability of the required data. If you have two layouts, with just one element replaced, than why do you have to pass two different sets of data to the view? Controller serves all the data (or access to it), view uses the data as required. To conclude - of course the view should dictate what element it needs - it already does by using it. But for expanding that do not look from the view side and what the view can set - look at how the data source can grow to satisfy different views. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
