Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
How about adding a variable in the Drupal settings table for pagination_disabled, which defaults to FALSE, but then we can override that in a site's settings.php file. My use case is that I have a mobile site that I don't want pages on (m.example.com), but I do want them available on the desktop site (www.example.com). So I could have a DOCROOT/sites/m.example.com/settings.php file where I say something like $conf['pagination_disabled'] = TRUE. Then the Pagination class's getValue() method can check that and if TRUE, return 0, which should stop the node hooks from doing their thing.
Comment | File | Size | Author |
---|---|---|---|
#1 | override-2044381-2.patch | 489 bytes | jason_purdy |
Comments
Comment #1
jason_purdy CreditAttribution: jason_purdy commentedHere's a simple patch to getValue() that checks for the variable and returns 0 (no pagination) if the pagination_disabled setting (which defaults to FALSE) is set to TRUE.