php - CakePHP: Remove "page:#" from url params -
i have search form using get method. form works fine until use after paginating through results.
users can enter site number of urls domain.com/serach/results/something/something_else/ important part domain.com/serach/results/.
here's code the form looks like:
echo $this->form->create(null, array( 'type' => 'get', 'url' => $this->html->url(null, true), )); this make form this:
<form action="http://domain.com/serach/results/something/something_else/" method="get"> the problem when paginate results adds page:2 or page:3 action looks like:
<form action="http://domain.com/serach/results/something/something_else/page:3" method="get"> is there built in function in cakephp lets me remove page:3from url that's being passed form action or going have create function looks , removes page:#?
just set url verbose way:
'url' => array('controller' => 'x', 'action' => 'y') + $this->request->params['pass'] done!
Comments
Post a Comment