Search code examples
cakephpcakephp-2.0cakephp-2.1

Grabbing the page number in the controller in CakePHP


How do I grab the page number in the controller of my php code and also set it?


Solution

  • The current page number will be in the Controller params.

    Try debugging it to view its contents, or using the DebugKit:

    // Within your controller action:
    debug($this->request->params);