I have loads of model functions returning different datasets already. I would like to be able to paginate these without having to rewrite them all using the paginate method in the controller. Is there a tidy way of doing this?
A:
Wouldn't this do the trick?
$this->set('dataSet', $this->paginate($verySpecialModelDataSet, $paginateOptions));
If you have many controllers, you could possibly make your calls by overriding beforeRender() [http://book.cakephp.org/view/60/Callbacks] in AppController.
sibidiba
2010-03-04 20:39:01
It doesn't appear to sadly, would make my life so much easier. I think it's missing that function. (I'm using CakePHP 1.2).
Jenski
2010-03-05 09:38:07
CakePHP 1.3 is almost out. Would it be very difficult to upgrade? See migration guide http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3
sibidiba
2010-03-05 12:58:19