Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent PagerNav behavior with certain numPageLinks values #969

Closed
thetuningspoon opened this issue Aug 26, 2019 · 5 comments
Closed

Comments

@thetuningspoon
Copy link

thetuningspoon commented Aug 26, 2019

Short description of the issue

See Robin S.'s thorough documentation of this issue here:

https://processwire.com/talk/topic/21912-change-how-many-page-numbers-to-show-between-ellipses-in-pager/?do=findComment&comment=188254

Expected behavior

I expected a numPageLinks of 3 would show the current page in the middle of the number of the previous page and next page.

Actual behavior

The previous two numbers show along with the current, and the next page number doesn't appear at all. On page 4, only 2 page numbers appear (previous and current). And on the second to last page, an ellipse shows between the two last numbers. (Again, see Robin S.'s post for more detail)

Setup/Environment

  • ProcessWire version: 3.0.123
@ryancramerdesign
Copy link
Member

@thetuningspoon Thanks, the module is designed to support a minimum value of 5 for numPageLinks, unless the quantity of items to paginate falls under the threshold of what would produce that number. But I can see it doesn't mention a minimum value anywhere so I have updated it to indicate that. The intended value for this setting is 5 or 10, and numbers in between those are probably okay too.

@matjazpotocnik
Copy link
Collaborator

@ryancramerdesign in case you didn't see, there is a solution, maybe you could consider? https://processwire.com/talk/topic/21912-change-how-many-page-numbers-to-show-between-ellipses-in-pager/?tab=comments#comment-190363

@thetuningspoon
Copy link
Author

@ryancramerdesign Thanks, having the minimum value specified will be helpful, though I am still unclear what that number actually refers to (does it include the page links between the ellipses? Does it include the previous and next links?) At any rate, I think it should be possible to achieve a pager that looks like:

Prev 1 ... 3 4 5 ... 7 Next

This is ideal for many mobile layouts where you might not want page numbers wrapping to the next line.

@matjazpotocnik
Copy link
Collaborator

@thetuningspoon there have been some changes in the PagerNav module. Can you test with the latest PW dev version?

@matjazpotocnik
Copy link
Collaborator

@thetuningspoon closing this issue, reopen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants