3

I have a standard cakePHP backend but I'm not using the cake pagination helper. My existing frontend provides pagination params in the form "startIndex, numberOfResults" vs. "page". It would be great if from within the controller action I could just parse my startIndex, numberOfResults params, calc the proper page and then do something like:

paginate['page'] = $pageNumber;

before the paginate() call. No such luck. So my question is, how can I set the paginator page from within the controller? As a bonus: Where is cake parsing the page named param? Where does it store the page value used for the paginate call?

4

1 回答 1

0

因为它是 1.2 应用程序。您应该尝试$this->params['url']['page']像这样更改:

      $this->params['url']['page'] = $pageNumber;

来源:CakePHP 1.2

于 2014-12-15T23:12:28.840 回答