Hey I have a question on paginations. I got it working on the part of
my application in which users submit posts, but I want it to be used in
a way that counts up, so that the first post would always be on page
one, and as they got into newer posts, say post 100, it would be on page
10. This way users would always know what page their post was on and it
wouldn’t change as more posts were submitted. Anyone who has any info
on how to do this, it would be appreciated!
Tom D. wrote:
Hey I have a question on paginations. I got it working on the part of
my application in which users submit posts, but I want it to be used in
a way that counts up, so that the first post would always be on page
one, and as they got into newer posts, say post 100, it would be on page
10. This way users would always know what page their post was on and it
wouldn’t change as more posts were submitted. Anyone who has any info
on how to do this, it would be appreciated!
In your model, instead of fetching the records in descending order,
fetch it in ascending order. This way, 10th page will have 100th post (
assuming each page displays 10 records in ascending order)