Re: Doubt in cake php

2009-09-30 Thread theChrisWalker
On the other hand, to answer your question, you can always use: ClassRegistry::init('ModelName')-find(...) to read data from a model in a view. I often use this approach in cached elements, that display things like yesterdays stats where the read access is needed but only once per day then

Re: Doubt in cake php

2009-09-29 Thread Walther
Just be careful with requestAction. If you don't cache properly you can dramatically slow down your application. Mark Story has some good tips on requestAction use at his blog (http://mark-story.com/) On Sep 28, 12:15 pm, John Andersen j.andersen...@gmail.com wrote: It will not be much more

Re: Doubt in cake php

2009-09-29 Thread Travis L
I don't see it as making the controller fat, really. It's where this call belongs. I usually think of fat controllers as doing some of the models' heavy lifting for them. But in this case, putting the code in your controller is clearly the right thing to do, by Cake's MVC principles. Don't

Re: Doubt in cake php

2009-09-28 Thread hunny
On Sep 25, 10:27 am, John Andersen j.andersen...@gmail.com wrote: Look into the controllers method requestAction, which allows you to retrieve the list of clubs in a view! Enjoy,    John On Sep 24, 11:59 am, hunny saurabh85maha...@gmail.com wrote: Hi Guys, I am new to cakephp. I am

Re: Doubt in cake php

2009-09-28 Thread John Andersen
It will not be much more fat, as the only thing each function used by a requestAction should be doing, is to call the model and return the models data. Enjoy, John On Sep 28, 12:46 pm, hunny saurabh85maha...@gmail.com wrote: On Sep 25, 10:27 am, John Andersen j.andersen...@gmail.com wrote:

Re: Doubt in cake php

2009-09-28 Thread mark_story
1.3 will not be implementing object results from models. 1.3 is still php4 compatible, and is a _minor_ version release. Switching out the lower levels of how models work is not a minor change. Perhaps you are thinking of CakePHP 2.x? -Mark On Sep 24, 3:25 pm, Jon Bennett jmbenn...@gmail.com

Re: Doubt in cake php

2009-09-28 Thread Jon Bennett
hi Mark 1.3 will not be implementing object results from models.  1.3 is still php4 compatible, and is a _minor_ version release.  Switching out the lower levels of how models work is not a minor change.  Perhaps you are thinking of CakePHP 2.x? Ahh, ahem - yes, I was -- jon bennett w:

Doubt in cake php

2009-09-24 Thread hunny
Hi Guys, I am new to cakephp. I am having the following issue: I am displaying list of checkbox containing clubs to a login user. The list of clubs I am passing through the models via controllers in the traditional way. Now the logged in user should see his list of clubs automatically ticked.

Re: Doubt in cake php

2009-09-24 Thread Jon Bennett
Hi, Basically i am looking for something similar like View Helpers in Zend. We can access the model data in views using view Helpers. Is there something similar in cakephp. Short answer: you can't. Longer answer: as the current version of cake is both php4 and 5 compatible, it uses arrays

Re: Doubt in cake php

2009-09-24 Thread Martin Westin
Ever heard of a can of worms :) (The whole -This is MVC. -No, this is MVC thing can turn nasty at times.) Cake allows no direct access to Models from Views. That is how the MVC pattern has been implemented in Cake even though there are other interpretations in other Frameworks. If everyone had

Re: Doubt in cake php

2009-09-24 Thread John Andersen
Look into the controllers method requestAction, which allows you to retrieve the list of clubs in a view! Enjoy, John On Sep 24, 11:59 am, hunny saurabh85maha...@gmail.com wrote: Hi Guys, I am new to cakephp. I am having the following issue: I am displaying list of checkbox containing