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

Add prev and next return values #89

Merged
merged 4 commits into from
Sep 29, 2016

Conversation

paramburu
Copy link
Contributor

It adds the previous and next page index only if there is a page to go in their respective directions.

Some template engines don't let you do the math on the template side very easily and this way everything that is needed is encapsulated in the same object.

While it is fairly easy to implement this functionality outside the library it is convenient to provide it with the other return values so it encapsulates everything needed on the pagination template on a single object. Although most template engines let you do the math on the template side there are some that don't or require writing extra helpers.
@niftylettuce niftylettuce merged commit 60c1bfb into edwardhotchkiss:master Sep 29, 2016
@niftylettuce
Copy link
Collaborator

Released in v5.0.1

@niftylettuce
Copy link
Collaborator

There was something wrong with this commit, or perhaps #85 that caused v5.0.1 to break. Perhaps you can look at #73 and #97

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

Successfully merging this pull request may close these issues.

2 participants