-
Notifications
You must be signed in to change notification settings - Fork 344
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
Page parameter name #820
base: master
Are you sure you want to change the base?
Page parameter name #820
Conversation
…be used to access the page_name
…be used to access the pageParameterName
Do we really need to pass the entire Pagination object? I think passing only the options array can be enough. |
Hi @garak in this comment on the issue you said
Did I miss-understand what you had meant? Or not implement it in the way you expected? Essentially I took the code you proposed, updated it slightly for changed variable names, then modified the templates to pass in that third parameter. |
Well, I wrote that code a few months ago. Probably I would ask the same question to the past myself: why passing the entire object, when we can pass only the options? Moreover, considering that the object is only used to retrieve the options themselves. |
How would you like me to proceed? I can modify it such that we pass only that parameter (which for reference is how is used to work in v5), or we can continue with this approach? |
Change the method to accept an array, pass |
@garak thank you for your feedback - I've pushed another commit which I hope as implemented things as you intended. |
This PR resolves #815 in the manner suggested by @garak in that issue - passing the entire SlidingPagination object to the templates to allow the pageParameterName to be accessed.
In the future it would likely be possible to remove some of the local variables which are created as the template is being rendered since they could be accessed directly from the SlidingPagination, however I wanted to keep this PR to solving just the issue at hand.