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 <[email protected]> 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. :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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?hl=en -~----------~----~----~----~------~----~------~--~---
