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

Generate URLs for the user #9

Open
elpete opened this issue Feb 15, 2021 · 1 comment
Open

Generate URLs for the user #9

elpete opened this issue Feb 15, 2021 · 1 comment

Comments

@elpete
Copy link
Contributor

elpete commented Feb 15, 2021

One slightly tricky thing when generating pagination URLs is keeping all the other query string parameters besides page. It could be a nice option to have cbpaginator generate those for you for prevURL and nextURL. This would require a new method argument of the current url to generate the links from. We could wire this up automatically in ColdBox, but other users would need to either provide it themselves, use a default (maybe in the CGI scope), or use a pagination method that doesn't generate links. This would probably be another option alongside generateSimple.

The last idea with this is that we maybe want to generate the links in-between, like so:
image
Not sure how we would know what pages the user wanted generated, so maybe that's a separate ticket.

@JamoCA
Copy link

JamoCA commented Jun 10, 2022

Generating HTML/CSS (and adding other URL options) may be beyond the scope of this internal query object modifier.

If you want to generate HTML-based navigation, pagination.cfc (the "premier paging library for ColdFusion programmers") is available to perform that function for you.
https://www.dopefly.com/projects/pagination/

pagination.cfc also works with arrays & structs (in addition to only queries). Here's some live examples using different themes.
https://www.dopefly.com/projects/pagination/examples/

Some features of Pagination.cfc:

  • Turns a large amount of data into a smaller paged set
  • Paginates query datasets, arrays or structs
  • Caches output for speedy delivery
  • Many options, very customizable
  • Overridable and extendable
  • Fully documented
  • Examples provided
  • Can output numbered lists
  • Can emulate popular sites (such as Google)
  • Drops in your current application easily

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

2 participants