views:

145

answers:

1

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
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
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