First of all we should understand the pagination concept , so for this check the cakephp.org .
If we want to pass the custom variables in pagination so first of all pass the variables to the view . Lets suppose we want to pass $pass .
In the controller write this :
$this->set('pass',$pass);
Then in the View file write this code :
<?php
$this->Paginator->options(array(
'url' => array(
'pass' => $pass
)
));
?>
So if user moved from page 1 to page 2, the url arise would be somewhat alike below:
http://localhost/cake/posts/index/pass:testString/page:2
0 Comment(s)