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

how to check the pagination limit while showing the pages

how can i check the pagination limit while showing the next 5 pages....like below i want to show the next four pages in the pagination?

                                    <li class="active">{{ link_to("employee/display?page=" ~ page.current~"&search_criteria="~request, '<i class="icon-fast-backward"></i> '~ page.current ) }}</li>
                                    <li>{{ link_to("employee/display?page=" ~ (page.current + 1 )~"&search_criteria="~request, '<i class="icon-fast-backward"></i> '~ (page.current + 1 ) ) }}</li>
                                    <li>{{ link_to("employee/display?page=" ~ (page.current + 2 )~"&search_criteria="~request, '<i class="icon-fast-backward"></i> '~ (page.current + 2 ) ) }}</li>
                                    <li>{{ link_to("employee/display?page=" ~ (page.current + 3 )~"&search_criteria="~request, '<i class="icon-fast-backward"></i> '~ (page.current + 3 ) ) }}</li>
                                    <li>{{ link_to("employee/display?page=" ~ (page.current + 4 )~"&search_criteria="~request, '<i class="icon-fast-backward"></i> '~ (page.current + 4 ) ) }}</li>
                                    <li>{{ link_to("employee/display?page=" ~ (page.current + 1 )~"&search_criteria="~request, '<i class="icon-fast-backward"></i> Next' ) }}</li>

I dont really understand you, but cant you make a loop or? Can you explain a little more?

It's not possible with builtin paginator class to make sure that it's fast as it can be. You can always extend it and add such an option. Generally speaking it can be not efficient to check page limit when having thousands of records, phalcon is all about performance - this is why there is no such option.