Welcome Guest, Not a member yet? Register   Sign In
How to loop pagination links using for loop instead of using foreach loop
#9

(This post was last modified: 06-10-2022, 04:23 AM by venance.)

(06-09-2022, 04:09 AM)InsiteFX Wrote: Then you must have something wrong in your code because I use both of those for displaying

Page 1 of 25

etc; And they work just fine.

No I didn't mean I get any error, the reason is to find the best way to extend pager class.
eg
PHP Code:
CustomPagination extends Pager
{
      // some extra methods here like
     public function getNextPageNumber(){}
     public function getPreviousPageNumber(){}
     public function getCurrentPageNumber(){}


How this can be done?
Also, Can you please help me to improve the logic's in my pagination view. I think it's not working as I expected for the first number of pages after dots and the last number of pages to be shown after dots eg prev 1 2 3  . . . 10 11 12 next.
Reply


Messages In This Thread
RE: How to loop pagination links using for loop instead of using foreach loop - by venance - 06-09-2022, 07:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB