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 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. This list is present in another database.
>
> > One solution is to get the list of user clubs in the controller itself
> > and pass it to the view.
>
> > But is there any alternative way, where I can access the user clubs in
> > the view itself without loading in the controller.
>
> > 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.
>
> > P.S: I have asked this question to a few people who knew cake php and
> > their first reaction is that you shouldn't access model data in views
> > as it is against MVC. But let me assure you we can access model data
> > in view as long as it is read only. At least that is what we are used
> > to follow in Zend Framework. :)
>
>
Hi All,

Thanks for your help. I was just reluctant to put the code in the
controller because it makes your controller fat.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to