I’m trying to integrate the exact same pagination (bulma css framework):
I managed to make the previous, next buttons and range pagination work, i also made the first and last page button. Now in the middle there is the pagination range, and i can’t manage to find a solution:
When there is less than six pages, it should just display 1 2 3 4 5, when there is at least six pages it should display 1 … 2 3 4 … 6 , etc… While displaying current, previous and next page on the pagination range…
Edit: after thinking more about that it looks like its more difficult than that, because there shouldnt be the “…” if there is no page between the first fixed page button and the first page displayed by the pagination range… same for the last…
Also, very strangely, my page:2 lend on an error page but all the other pages works…
So, i put it online for you to eventually review… And on my remote server blog’s pagination page:2 is working, now we know that it was a server issue, maybe triggered by some code issue tho… Here is the link to the installation, let me know if you need the zipped folder.
Edit, i’m running on MAMP locally on a mac book pro. Apache, php 7.1.12. I can paste you my whole php info if needed
Hm, interesting, I’m running on Mamp on a MacBook Pro as well and never had issues with the pagination, no matter what PHP version. If you want, you could provide a zip. and. I could throw it into my. dev environment to see if I run into. the same issue.
Im going to go with it for the moment, will reinstall mamp clean and try…
Thanks for your help. What about my first issue? If you see the blog pagination you’ll understand what ly problem is, trying to hide first and last page from pagination range as they are already showed out of the range, and try to hide the “…” when there is no hidden page before the first pagination range or after the last… hard t o explain, and english isnt my native language…
What do you want to happen if the range includes either the last page or. the first page? For example, if your range is set to 2, the pagination range shows 3 pages. If you hide/remove the first or the last, you would end up with less pages in the range. Is that the desired behavior?
In your example, the active page is in the center of the range. But this won’t work for the first two and the last two pagination pages.
Hi, i think it would be best described by a “use case”, it need to behave differently when the user is on the 3 last or 3 first pagination pages (active page is bold):