"But I think we cannot do that in cakephp." you can use models anywhere in the complete cakephp framework - even in the subsubsubsub element of a view if you want to. simply be using ClassRegistry::init(ModelName) But that doesnt mean that you should...^^
On 22 Nov., 13:56, Kane The Pirate <[email protected]> wrote: > 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 <[email protected]> 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? > > > Fromhttp://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 sitehttp://ask.cakephp.organd help > > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > > [email protected] For more options, visit this group > > athttp://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 [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
