knppaginator - Symfony remove page parameter -


i'm using knp_paginator on symfony list information. information i'm listing generate lots of pages. problem when filter results.

let's i'm on page 3 generated link https://something.com/blabla?page=3 since filter doesn't generate 3 pages 0 results. if change page on url can see filtered results. how can make page parameter disapear when apply filters controller?

i think answer question showed in example of official docs:

  $paginator  = $this->get('knp_paginator');     $pagination = $paginator->paginate(         $query, /* query not result */         $request->query->getint('page', 1)/*page number*/,         10/*limit per page*/     );      // parameters template     return $this->render('acmemainbundle:article:list.html.twig', array('pagination' => $pagination));  

in example default parameter first page 10 max per page. if count records less 10 it'll show 1 page 7 records.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -