Closed walliby closed 11 years ago
Something like this should work:
$this->paginate = array( 'fields' => array('Person.id', 'Person.name', 'Person.class') ); $this->set('response', $this->DataTable->getResponse($this, $this->Person)); $this->set('_serialize', 'response');
Note this example assumes your controller $uses Person P.s. this is covered in the readme doc
That did the trick, thanks!
Great component! However, I am having trouble paginating another model from within my controller. The models are related but I want to paginate this other model independently. I am using the following code in my UserProspects controller which typically works but not with this component. Any advice would be greatly appreciated. Thanks!
$this->Paginator->settings = array( 'Person' => array('fields' => array('Person.id', 'Person.name', 'Person.class'))); $this->Paginator->paginate('Person');