arkunis
arkunis

Reputation: 11

How to have 2 pagination on the same page

how to have 2 paginations on the same page and that the change of one does not impact the second? I currently have 2 paginations on my page, and when I go to page 2 on the first, it puts me on page 2 also on the second, how can I prevent this? THANKS

Image 1

Image 2

i use symfony 6.3

i do nothing, because i don't know what i can do

Upvotes: 0

Views: 121

Answers (1)

arkunis
arkunis

Reputation: 11

    public function getPaginationNotFinish()
{
    $request = $this->requestStack->getMainRequest();
    $page = $request->query->getInt('pages', 1);
    $limit = 1;
    $articleQuery = $this->getAllNotFinish();

    return $this->paginator->paginate($articleQuery, $page, $limit, ["pageParameterName"=>"pages"]);
}

Upvotes: 0

Related Questions