After a vast work experience in CakePHP when I had to impliment pagination related task in Codeigniter I ignored one thing and basically it was very important for implementing proper pagination. It is uri_segment configuration of pagination.
uri_segment is actualy segments of urls
So for example URL for pagination will be like
http://example.dev/admin/membership/referels/1/7/10
then set uri_segment to 6
1 |
$config["uri_segment"] = 6; |
Here 6 is the count of segments from example.dev ahead.
similarly, if url is
http://example.dev/admin/membership/ref/1/30
then
1 |
$config["uri_segment"] = 5; |