CakePHP pagination and the get parameters

前端 未结 8 568
逝去的感伤
逝去的感伤 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:15

    use statement in your view for pass parameters while pagination

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

    this is simplest way to pass parameters.

    Some time $this->passedArgs not working at that time pass static value at there and try with that static value.

    $paginator->options(array('url' => array('a', 'b'))); 
    

提交回复
热议问题