Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Currently pagers are designed to modify SQL queries directly. They are pretty much useless if you want a pager, but you don't want it messing with your queries.
Example: in one of my contribs I use taxonomy_get_tree() to fetch the data I want to page. Since I have no query to work with, Drupal's pager is useless. I needed to write my own pager functions.
I suggest refactoring the pager functions (we _have_ to get rid of those awful globals with their fuzzy names) so they can be called by providing the total amount of pages and the current page and let modules alter their queries themselves.
Comments
Comment #1
XanoComment #2
Chi CreditAttribution: Chi commentedI think it is possible with pager_default_initialize().