Limit Pagination with Concrete5 5.7
Permalink
Can some tell me how to limit pagination results in Concrete5 5.7+
Currently there seems to be X pages listed: 1 2 3 4 5 [6] 7 8 9 10 11. There seems to be a certain number of pages listed before and after the page selected. I would like the ability to change X so I could have some thing like: 4 5 [6] 7 8, and dictate how many pagination pages are actually displayed.
I've seen several options for changing this for C5 5.6 and earlier, but I have not been able to find a solution for C5 5.7+
I've seen several options for changing this for C5 5.6 and earlier, but I have not been able to find a solution for C5 5.7+
Can you explain what you mean by limit pagination? Like you only want to show the first X pages or what are you trying to do?
Yes, I would like the ability to change X so I could have some thing like: 4 5 [6] 7 8, and dictate how many pagination pages are actually displayed.
I've seen several options for changing this for C5 5.6 and earlier, but I have not been able to find a solution for C5 5.7+
I've seen several options for changing this for C5 5.6 and earlier, but I have not been able to find a solution for C5 5.7+
Hi,
have you found a solution? I'm facing the same problem as you were.
Thanks for your help.
have you found a solution? I'm facing the same problem as you were.
Thanks for your help.
Sorry, I have not found a solution.
PagerFanta, the script behing C5 pagination has a "proximity" option. That option is then used in a function named calculateStartAndEndPage().
That aptly named function uses the proximity option to decide how many pages to show before and after the current page.
I believe that's what you need?
That aptly named function uses the proximity option to decide how many pages to show before and after the current page.
I believe that's what you need?
Yep that's what I needed. Still not 100% how everything is working but I managed to fix my problem.
So here is where it's defined in DefaultView.php
Then in my view.php
This bit of code worked for my problem. If example helps anyone. I also added some jQuery for changes on mobile.
Thanks again mnakaly!
So here is where it's defined in DefaultView.php
private function initializeOptions($options) { $this->proximity; }
Then in my view.php
This bit of code worked for my problem. If example helps anyone. I also added some jQuery for changes on mobile.
Thanks again mnakaly!
You are very welcome
What type of pagination results are you trying to limit?