I have implement custom ajax pagination and collection is returning from controller.

I have trying pagination first time render pagination from block and set collection limit 5. After second time when click on any page then send the page number to controller via ajax and collection is filtering fine and updated collection in front side.

But I have faced issue in front custom pagination html it is not rendering properly. For example I have 55 record and limit is 5 then correct html should be

1 2 3 4 5 Next

when click on 5 it should be

Previous 6 7 8 9 10 Next

when click on 10 it should be

Previous 11

Any have idea how to set custom pagination html dynamic.

Any help would be appropriated. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.