It can be done in MVC application, but it is recommended in case of having issue to render the view with the controllers' data. Also the main logic of the code is in the controller, so taking just the model data you are limiting the capacity of the data processing
Em 22 de novembro de 2011 10:46, rchavik <rcha...@gmail.com> escreveu: > > On Tuesday, November 22, 2011 6:00:24 PM UTC+7, Mike Karthauser wrote: >> >> >> why would you want to load model in the view? >> > > I have come across this requirement/need. And this is something that I've > been wondering myself, i.e: are we allowed to instantiate a model in views > by the rules of MVC? > > From http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller, > "Overview" section, number 4 on the list. > > A view queries the model in order to generate an appropriate user interface >> > > That sounds like that views are actually allowed to interact with models. > So, to answer my own question above, occasionally I do use models + custom > finds in views. :) > > -- > 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 > cake-php+unsubscr...@googlegroups.com For more options, visit this group > at http://groups.google.com/group/cake-php > -- 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php