We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Problem with Pagination..!!

If i get request through Post i need to display specific data specified in the request and if the request is not through post i need display all the data....And i am using Pagination for this....So when ever request comes through post i display data specified in the request...but if data is more than the limit size of the pagination....i am not able to view the data on next page..........as the page number comes through GET request(link_to)......Any solution for this problem?

                                            if ($this->request->isPost()) {
                                            $data=$specific_data//can have > 100 records so not able to access from page no 2
            }
        } else {
           $data= $complete_data
        }
                    $paginator = new Paginator(array(
            "data" => $data,
            "limit" => 10,
            "page" => $this->request->getQuery("page", "int", 1)
        ));

not sure if that is a paginator problem as it is you attempting to get a post variable, you should just post the page number along with the request