You're setting a var named, "libraries", not "library".
On Mon, Jan 26, 2009 at 7:51 AM, Marcelo Iwata <[email protected]> wrote: > I was having the same problem as this one: > > http://groups.google.com/group/cake-php/browse_thread/thread/64c581784c5674cd/fe1ac5f63f84b94f?lnk=gst&q=paginator+recursive+sort#fe1ac5f63f84b94f > > > I have a Library that belongs to a Membership, and a Membership that belongs > to a User and a Project. > So, i was looking for a answear ,and i decided to force the bind Process. > > So, my controller is like this: > ... > var $paginate = array('limit' => 15, 'page' => 1, 'recursive'=>2); > ... > function showLibraries(){ > $this->set("CSS", "main"); > $this->Library->unbindModel(array('belongsTo' => > array('Membership'),),false); > $this->Library->Membership->unbindModel(array('belongsTo' => > array('User')),false); > $this->Library->Membership->unbindModel(array('belongsTo' => > array('Project')),false); > $this->Library->bindModel(array(array('belongsTo'=> > array('Membership'=>array(),'User'=>array('foreignKey'=>false,'conditions'=>array('Membership.user_id=User.id')))))); > $this->set('libraries', $this->paginate('Library')); > } > > > > But, this cannot be done, because the ctp's variable > $library['Membership']['Project']['name'], cannot be found. > Any ideas? > Thanks in advance. > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
