CakePHP pagination and the get parameters

前端 未结 8 569
逝去的感伤
逝去的感伤 2021-02-02 02:31

I have a problem with the pagination in my search page. When a user search something I have a url like domain.com/search/?s=keyword but paginator gives me links lik

8条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-02 03:07

    To pass all URL arguments to paginator functions, add the following to your view: Plain Text View

    $paginator->options(array('url' => $this->passedArgs));
    

    That's it. See http://book.cakephp.org/2.0/en/core-libraries/components/pagination.html

提交回复
热议问题