Problem/Motivation

There is no way for a site to set how many items can be displayed using pager. Currently the default is 10 items.

Proposed resolution

It would be nice to allow the site admin or end user to set how many items they want to display per page using pager.

Remaining tasks

Decide on the proper implementation.
Four methods have been proposed.

  1. Allow the site admin to set the number a items to view per page using pager. Also increase the default to 50.
  2. Allow the end user to set the number of items per page when using pager.
  3. Abandon the pager concept wholesale and aim for infinite scroll: #1488866: Redesign pagers for administrative lists.
  4. Go from a number based pager to alphabetical based.

User interface changes

Admins or users will be able to set a number of items to display per page using pager, and alphabetical list, or an infinite scroll approach.

Questions:

1. Which of these methods, or some combination of them, is preferred?
2. What numbers should be used for min/max values, if any?
3. Where do we want the validation performed?

Original description

It will be nicer to have an option that users can select by themselves how many records can be displayed on a page, such as 5, 15, 50, or all records. This feature is actually very common.

The best place I have thought is to add the feature to the pager.

I have implemented this feature on my site one year ago when I was new to Drupal. As it requires many changes not only in pager.inc but also somewhere else, I expect that Drupal developers can do a better job than me.

I look forward to see this common feature in Drupal 4.7.

Comments

sepeck’s picture

rather then expect others to do a better job, please attach your patch for others to examine your appraoch and comment yes/no/ ideas.

thinker’s picture

I would love to. However, as I said, my implementation was very old based on Drupal 4.4.X, I don't think it will be useful, helpful or worth at all for you people to look at it.

Well, if you think this feature is really really hard to be implemented, I may re-write it based on Drupal 4.6.X and let you examine my code. However, I don't think it will save any time or energy for both you and me in order to put the feature in Drupal 4.7.

Let me know your comments.

Thanks,

magico’s picture

Version: 4.6.4 » x.y.z
dww’s picture

Title: Please improve the pager » provide UI on pager to change the # of things displayed per page (and allow "show all")
Version: x.y.z » 6.x-dev

bump: this is a ubiquitous interface outside of drupal, and incredibly handy. it'd be *really* nice to have this for D6. anyone available to work on it? my hands are way too full as it is already... :(

dww’s picture

Assigned: Unassigned » dww

i could see problems with running out of memory, especially if people used 'show all' carelessly (e.g. on the front page of d.o)... if that's the only objection, i think we can come up with some solutions. worst case is we add a new permission for using this functionality. better yet is some fine-grained settings to contol limits for different pager queries (gee, if only we had a query builder and each query had a unique query id). ;) perhaps in the code, where we currently hard-code the value, we'd just hard-code the upper limit and default value for that particular pager query. or some combination of the above.

one of my primary motivations is for the issue queue pager. by default, 20 issues seems ok, but in some cases it'd be really handy to bump that upto 100, or even do a "show all" for a given project. thing is, this isn't a site-wide setting that makes sense, nor would it work as a per-user setting in your profile. i'd want to see different things depending on what issue queue i was looking at. always having a tab open on my profile page to keep changing the setting would drive me insane. in theory, i *could* add some custom crap to the pagers in project* to handle this as a special case, but i'd rather just put that effort into the D6 core pager...

anyone else with me? ;) any chance this is going to get committed if i come up with a nice solution? i'd hate to work like crazy on this, only to run into a veto from the D6 maintainers...

gábor hojtsy’s picture

Yes, I was clicking on this link in your mail to come and share my performance concerns. What if someone asks for a few hundred nodes on the tracker pager for example? Tracker is already slow enough as far as I see. So limits should be in place. Otherwise it is indeed better to have this setting in the URL (against my point expressed on 2005-10-12), because you can hand around links that way, which would list the same number of things on the pager (maybe if the user has the permission, if this is bound to permissions).

kattekrab’s picture

Version: 6.x-dev » 7.x-dev

Hello!

:)

It would be great to add a user choice widget to pager so that we can choose from some options (5, 10, 15, 100 or Show All) - and seeing that it didn't happen for 4.X, 5 or D6 - can it happen for D7? Pretty Please?

I realise it can put load on the server but ways to mitigate that risk were pointed out above.

Also - one query that delivers 1000 results saves another 20 queries looking through pages that deliver 50 results each.

Give me the option to grind my server to a halt. Restrict it to admin users, whatever... but really, it would be very very useful.

dww’s picture

Version: 7.x-dev » 8.x-dev
Assigned: dww » Unassigned

Sadly, no chance for D7 now. :( This is a new feature, and we're long past feature freezes and exceptions for D7. This will have to happen in D8 if it happens. I've got no time to work on it anytime soon, so I'm unassigning myself, too.

kattekrab’s picture

Version: 8.x-dev » 7.x-dev

What if someone submitted a patch? Would there be a chance?

dww’s picture

Version: 7.x-dev » 8.x-dev

No chance, sorry. A feature freeze means that the only patches accepted to Drupal 7 core are bug fixes at this point. If they kept allowing new features, we'd never stabilize the release and be able to ship 7.0.

kattekrab’s picture

Fair enough! :)

So if we do submit a patch (already halfway there, for our own use) to Drupal8 (once that's open) is there any chance it could get backported to 7.x or something? Or should we be looking at just maintaining this for our own use?

webchick’s picture

Dries and I have yet to hash out what features exactly from D8 could get back-ported, but since this implies UI changes I'm not sure we could do it. As a book author and documentation team member, I'm /very/ sensitive to invalidating screenshots and documentation.

For now, though, I'd like to focus on just getting D7 out the door. :)

cafuego’s picture

StatusFileSize
new4.46 KB

Well, so that there's no duplication of effort for 8.x, here's my 7.x patch that allows for the 'show all' option on pagers.

It strikes me that it might be possible to work this into a module, so it could be a contrib thing for D7.

cafuego’s picture

Status: Active » Needs review
StatusFileSize
new7.12 KB

I have reworked the patch, so it works as I think it should. Clicking 'show all' will suppress all but the '« first' and 'last »' links now. It's set via the url ?all=1 so it will work in links.

As indicated by Gábor, 'show all' can cause a lot of load on a system if a giant list of stuff is loaded (and then themed, possibly with sub-queries) so I've added a permission. There is not currently a warning on that permission, though.

If a user without this permission clicks an ?all=1 link, it will happily degrade to showing the first page of a normal pager.

Attached is the patch against git 8.x.

mattyoung’s picture

subscribe

kattekrab’s picture

Status Ignored? What does that mean?

Status: Needs review » Needs work

The last submitted patch, pager-39954-13.patch, failed testing.

cafuego’s picture

Status: Needs work » Needs review

#14: pager-39954-13.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, pager-39954-13.patch, failed testing.

cafuego’s picture

Status: Needs work » Needs review
StatusFileSize
new7.1 KB

Fixed the exceptions in the test bot by properly initialising variables.

michaelfavia’s picture

Patch applies cleanly and works as expected. Neither coder nor my cursory review find any style issues. I can't speak to this as a desired feature in core but if it is it seems to fit the bill well enough. ;)

xjm’s picture

Status: Needs review » Needs work
Issue tags: +Novice

This seem like a reasonable feature. Thanks for working on the patch! I have just one VERY minor note on code style:

+++ b/includes/pager.incundefined
@@ -73,7 +73,15 @@ class PagerDefault extends SelectQueryExtender {
+    // If the user did not click 'show all', calculate the query range. Otherwise

@@ -194,6 +202,17 @@ function pager_find_page($element = 0) {
+ *  A boolean that indicates whether the user has access and the link was clicked.

I think these lines are 1-2 characters too long, so let's wrap the last word of each onto the next line.

Also, note that the Drupal 8.x patch will need to be rerolled, because the core directory structure for Drupal 8 has now changed. (For more information, see #22336: Move all core Drupal files under a /core folder to improve usability and upgrades). When the patch has been rerolled, please set the issue back to "Needs Review."

Tagging as novice for the task of rerolling the Drupal 8.x patch (preferably with the line rewrapping mentioned above).

If you need help rerolling this patch, you can come to core office hours or ask in #drupal-gitsupport on IRC.

kattekrab’s picture

Status: Needs work » Needs review
StatusFileSize
new7.16 KB

(my first patch - under supervision)

Updated the patch to apply to latest Drupal 8.x and adjusted comments as suggested by @xjm.

xjm’s picture

Status: Needs review » Needs work
Issue tags: +Needs screenshots, +Needs manual testing
StatusFileSize
new836 bytes
new7.18 KB

Thanks @kattekrab, it looks great.

+++ b/core/includes/pager.incundefined
@@ -194,6 +202,18 @@ function pager_find_page($element = 0) {
+ * Determines whether the current user has access to the 'show all' link in
+ * the pager and whether the show all link was clicked.

Just noticed this summary is two lines. I've fixed that in the attached patch.

Now, let's have one more person test out the patch and add some screenshots of how it works. Thanks!

xjm’s picture

Status: Needs work » Needs review

Oops. Darn dreditor. :)

kattekrab’s picture

Status: Needs review » Needs work
StatusFileSize
new235.68 KB
new176.75 KB
new98.29 KB

Installed D8 with patch applied, used devel to generate 1000 nodes. It certainly takes a moment to display them, but it displays 1000 nodes with the option to click back to the start or end of a pager based display, instead of show all.

In other words. It works!

Three screenshots attached showing

Permissions
"Access "show all" fuctionality in pagers "
[which has a typo - hooray - my 2nd patch will follow this.]

Content list
50 devel nodes showing
" 1 2 3 4 5 6 7 8 9 … next › last » show all "

Content list
1000 devel nodes showing
" « first last » "

kattekrab’s picture

Status: Needs work » Needs review
StatusFileSize
new49.38 KB
new7.19 KB

My 2nd Patch (tm)

Applied xjm comments changes from #24 and fixed typo in the permission.

New screenshot with typofix shown attached.

kattekrab’s picture

StatusFileSize
new7.26 KB

Removed stealth whitespace.
Added description to the permission.

kattekrab’s picture

StatusFileSize
new28.73 KB

And just for OCD sake - a screenshot showing the permission description is attached.

I've also tested a user without permission to access the show all, and huzzah - the 'show all' does not show. Likewise editing the URL manually to show all (eg node&all=1) does not show all.

tayljay’s picture

I think that it would be a very useful feature to be able to nominate how many or for all records to be displayed on a page. It would make it much easier when searching - for example I often have to search through pages of users which would be made much easier if I could just do a find once on one page rather than on ten. Great idea : )

xjm’s picture

So I dreamed about this patch last night. Seriously. Anyway, I realized the behavior after you have clicked "show all" is not intuitive--"first" and "last" don't make any sense. What I'd prefer is a link to switch me back to the previous view. Maybe just one link to toggle it back, "show X" (50 for now), and it by default uses the last page you were on when paging. What do you think?

kattekrab’s picture

Issue tags: +Needs usability review
StatusFileSize
new236.33 KB

@xjm - when I grow up, I wanna dream about patches too! :)

But yes, I tend to agree. I'm just not sure of a solution.

So... based on the cursory research I just did - here's a super simple approach.

Add "show less" to the page that shows all - and link back to the first page of results.
Mockup attached.

Perhaps some usability / ux folks could weigh in with suggestions / point to a better approach?

Research

So here's a quick cursory glance at some pagination UI design patterns.

http://ui-patterns.com/patterns/Pagination
http://www.cxpartners.co.uk/cxblog/pagination_a_lazy_interface_decision_...
http://www.smashingmagazine.com/2007/11/16/pagination-gallery-examples-a...
http://ux.stackexchange.com/questions/789/pagination-best-practice
http://www.onextrapixel.com/2010/11/03/15-ui-design-patterns-web-designe...

Here's a Drupal example
http://mundanity.com/pagination-example

webchick’s picture

(Sorry, please don't hit me, but...)

Hm. One thing I observe from all of those screenshots is that none of the pagers referenced there have this "Show all" feature. :\ So while the feature itself sounds useful, I'm not sure it should be coupled with the pager.

kattekrab’s picture

This one shows the "show all" link :)

http://drupal.org/files/d8-pager-39954-showall.png

webchick’s picture

Status: Needs review » Needs work

Summary of IRC discussion:

+++ b/core/includes/pager.inc
@@ -355,6 +381,12 @@ function theme_pager($variables) {
+  // Only display the 'show all' link to users with permission.
+  if (user_access('show all items in pager')) {
+    // Check if the user has clicked 'show all'.
+    $pager_all = pager_show_all();
+    $li_all = theme('pager_all', array('text' => (isset($tags[5]) ? $tags[5] : t('show all')), 'element' => $element, 'parameters' => $parameters));
+  }

Yeah, I don't see how this is going to fly.

What this essentially does is make a global "flag" that anyone in the admin role is exempt from and so is any user I want to have this feature anywhere else on my site, that says in ALL instances of a pager, regardless of how many elements are in that pager and what those elements are, there will be a "Show all" link. Both in the case of a small list of small things, like 120 aggregator items AND in a list of large things like a list of 50,000 nodes with 30 fields a piece each of which requires 170 database queries to build).

This "Show all" element needs to be contextual, and used on a per-pager basis, IMO.

26 days to next Drupal core point release.

cafuego’s picture

StatusFileSize
new5.81 KB

I agree that it's probably not a good idea to have a 'Show All' link on all pagers on all sites. However, there is not currently a way to allow contrib modules to affect the pager beyond theming it, so some sort of change must be made to core to allow this functionality be added.

A different way to address this issue is to allow PagerDefault to be pluggable (See the second half of #778050: Add support for database hints and make PagerDefault properly pluggeable) so that contrib modules can implement their own pager queries and thus their own pager functionality.

I've also written a patch (attached) that allows the setting of a global pager limit. Currently the default defined in pager.inc is 10. This patch changes the default to 50 (which is what admin/people and admin/content were using anyway) and allows site administrators to change this default to any number between 10 and 1000. It expressly warns about performance if a number > 200 is chosen.

This patch changes the pagers in node.admin.inc and user.admin.inc to use th new user-configurable default. Other pagers in core are not affected, unless they didn't specify a number of items to begin with.

cafuego’s picture

Status: Needs work » Needs review
StatusFileSize
new5.81 KB

Bugger, forgot to set the patch to needs review. Reattaching.

xjm’s picture

Status: Needs review » Needs work
+++ b/core/modules/system/system.admin.incundefined
@@ -3170,4 +3208,4 @@ function system_action_delete_orphans_post($orphaned) {
+}
\ No newline at end of file

Please don't kill Mr. Newline!

(Need a newline at the end of the file.)

In general, this approach seems better, and it's a definite improvement over the current situation without the drawbacks above.

From reading the patch, it doesn't look like end users can configure it. I think I'd probably expect the option to show up next to the pager, rather than buried in the system config forms somewhere. Maybe that could live in contrib, though, given this patch.

Screenshots would be helpful here as well.

xjm’s picture

Status: Needs work » Needs review

Oops, didn't mean to do that. :)

kattekrab’s picture

Did someone say screenshots?

kattekrab’s picture

StatusFileSize
new102.63 KB

Attached screenshots.

Maybe we should tell the user that numbers between 10 and 1000 are accepted...

webchick’s picture

I guess if we wanted to keep this a global thing, another option could be setting the threshold for number of records beyond which the "Show all" link is hidden as an option. variable_get('pager_show_all_record_threshold', 150) or variable_get('pager_show_all_page_threshold', 3) or something. This really only comes up in situations where the number of records displayed is just more than will fits.

yoroy’s picture

StatusFileSize
new20.41 KB

Besides the 'show all' option, how is this different from the 'Number of posts per page' setting already available under config/site-information?

number-of-posts-1.png

I don't see it, what I'm missing here?

xjm’s picture

#43: That setting doesn't have any effect on the pager, to my knowledge. Separate functionality. That's only used for the front page and for term listings (teaser pages). The pager on the other hand is used for all manner of lists, like are found on admin/content, admin/people, etc.

However, we probably should make it obvious to users what the difference is, and maybe put the two together on the same form?

Edited to be less nonsensical.

yoroy’s picture

StatusFileSize
new25.15 KB

Ah, thanks. You are right, listings in admin go to 25 or 50. Hmm, so the existing one is for site front-end content listings maybe?

I think the only way to make this obvious is to treat these as *the same* thing first :) The mental image I got from this thread was more like this:

Mockup of a pager with a select list for items-per-page right next to it

Wouldn't that be a nicer gesture than moving into an admin setting? Either way this seems like merely a nice to have and I'm not sure it's up to core to provide it out of the box.

The mismatch I had with that existing setting tells me we need a clearer picture of what's already defined for pager/result list lengths before extending the feature.

cafuego’s picture

need a clearer picture of what's already defined for pager/result list lengths

There's isn't really anything. All pagers in core (minus the front page and term list) and contrib use whatever who wrote said feature thought would be appropriate. If nothing is specified, the pager defaults to 10 items per page.

An exception is the admin taxonomy term list, which lists 100 items per page. It references a variable that would in theory be able to adjust that size, except there's no UI to set said value. See #1332534: Long hierarchy taxonomy memory exhaustion; pager problem.

Wouldn't that be a nicer gesture than moving into an admin setting?

Either way, a way of changing the list size is what I want. I'm not particular bothered about how we accomplish that ;-)

I'm not sure it's up to core to provide it out of the box

Again, that fine. But if core doesn't provide a way of changing the pager page size, it should provide a way for contrib to do this. Then any number of pager modules could provide any number of pagers, making all users happy :-)

kattekrab’s picture

This seems to be languishing again... any progress?

NROTC_Webmaster’s picture

StatusFileSize
new5.58 KB

Here is the patch applied to the latest version without killing the newline.

Bojhan’s picture

Can we have a screen of the latest screen?

NROTC_Webmaster’s picture

StatusFileSize
new14.66 KB
new5.63 KB

Here is a screenshot and an updated patch.
Pager.png

xjm’s picture

Status: Needs review » Needs work
Issue tags: -Novice, -Needs screenshots +Needs issue summary update

Thanks @NROTC_Webmaster!

  • We still haven't really addressed the confusion from #43, I don't think.
  • I think I'd actually prefer to lose the configuration form and just retain cafuego's API for contrib to use, if anything.
  • Something like yoroy's mockup would be great, and even appropriate to core (I think). Perhaps this API could also provide a basis for that functionality, though (perhaps as a separate followup?)

Tagging for an issue summary to summarize the possible directions for this issue. We should probably pick one before proceeding (that's why I think this issue got stuck before).

Code review follows. Note that below I pointed out things to fix if we keep the form that exposes this config to the administrator (with the style notes about those lines), but as stated I personally think it would be better to nix all the lines related to the form. :)

  1. +++ b/core/includes/pager.incundefined
    @@ -10,6 +10,11 @@ use Drupal\Core\Database\Query\SelectInterface;
    + * The amount of items per page to show in pagers.
    ...
    +++ b/core/modules/system/system.moduleundefined
    @@ -1024,6 +1024,15 @@ function system_menu() {
    +    'description' => t('Configure the amount of items per page shown in generated lists.'),
    

    Grammar nitpick: These should be "The number of items" rather than "The amount."

  2. +++ b/core/includes/pager.incundefined
    @@ -68,10 +73,14 @@ class PagerDefault extends SelectExtender {
    +    else if (empty($this->limit)) {
    

    Should be elseif rather than else if. Reference: http://drupal.org/coding-standards#controlstruct

  3. +++ b/core/includes/pager.incundefined
    @@ -131,13 +140,14 @@ class PagerDefault extends SelectExtender {
    +   * The default if not specified is PAGER_ITEMS items per page.
    ...
    +   *   An integer specifying the number of elements per page. If passed a 0
    +   *   the configured default number of items is used. If passed a NULL or
    +   *   FALSE, the pager is disabled.
    

    Alright, so this host of different possible magic values is a little confusing. Not sure how to address it but that's a lot of special cases. It's also not clear in the method why all this is the case, so at the least I'd want some @see explaining why. Is there any way we can make the behaviors more explicit, though?

    Edit: I see now it's from the protected variable on the class, so let's clarify that at least. Still not sure about the magic "0 vs. NULL vs. FALSE," though.

    Aside (super nitpick) the word "passed" doesn't make sense in the @param. Given the current logic, I'd make the @param:
    An integer specifying the number of elements per page. If 0, the default from the 'pager_items' configuration variable is used. If NULL or FALSE, the pager is disabled.

  4. +++ b/core/includes/pager.incundefined
    @@ -131,13 +140,14 @@ class PagerDefault extends SelectExtender {
    -  public function limit($limit = 10) {
    +  public function limit($limit = 0) {
    

    So we are going from a default of 10 to one of 50, correct?

  5. +++ b/core/modules/system/system.admin.incundefined
    @@ -1612,6 +1612,44 @@ function system_run_cron_submit($form, &$form_state) {
    + * Form builder; Pager form.
    + *
    + * @ingroup forms
    + * @see system_settings_form()
    + */
    
  6. The summary should read:
    Form constructor for the pager settings form.
    It should also have @see to its submission and validation handlers. Reference: http://drupal.org/node/1354#forms
  7. +++ b/core/modules/system/system.admin.incundefined
    @@ -1612,6 +1612,44 @@ function system_run_cron_submit($form, &$form_state) {
    +  $form['pager_items'] = array(
    +    '#type' => 'textfield',
    

    We should maybe use a number element for this once #1174640: Add new HTML5 FAPI element: number is in!

  8. +++ b/core/modules/system/system.admin.incundefined
    @@ -1612,6 +1612,44 @@ function system_run_cron_submit($form, &$form_state) {
    +    '#description' => t('Enter the number of items the pager should show on a single page. If you set this too high, large listings might slow down your site.'),
    

    Do we need the second sentence here when we have the warning? Or, maybe we don't need the first sentence.

  9. +++ b/core/modules/system/system.admin.incundefined
    @@ -1612,6 +1612,44 @@ function system_run_cron_submit($form, &$form_state) {
    + * Validate handler for the pager settings form.
    

    This should read:
    Form validation handler for system_pager_settings().. Reference: http://drupal.org/node/1354#forms

  10. +++ b/core/modules/system/system.admin.incundefined
    @@ -1612,6 +1612,44 @@ function system_run_cron_submit($form, &$form_state) {
    +    form_set_error('pager_items', t('You must enter a positive whole number between 10 and 1000.'));
    ...
    +  else if (intval($form_state['values']['pager_items']) < 10) {
    ...
    +  else if (intval($form_state['values']['pager_items']) >= 1000) {
    ...
    +  else if (intval($form_state['values']['pager_items']) >= 200) {
    

    These seem kind of magic-numbery; maybe we should define some more constants?

NROTC_Webmaster’s picture

StatusFileSize
new6.83 KB
new6.37 KB

xjm,
Along the same lines I'm updating the patch according to your recommendations.

For #7 since we are using the number field do we want to add the min/max values here?
[edit] - the number field didn't work on my site. I don't think the patch was actually merged yet.

For #8 since we are giving a description to the input field I think it is essential to have the first sentence, but we can probably live without the second one since it is given on the validation.

In regards to #10 is there a specific reason we would not want the admin to "allow" the number to be less than 10? While I can't think of any specific examples where it may be useful having the option is always my preference. Maybe just a warning that it might hurt the user interface?

I don't know how to add the issue summary at the top but here are the things I see.

Issue Summary

Problem/Motivation

There is no way for a site to set how many items can be displayed using pager. Currently it is 10.

Proposed resolution

It would be nice to allow the site admin or end user to set how many items they want to display per page using pager. Also increasing the default limit to 50.

Remaining tasks

Decide on the proper implementation.
Two methods have been proposed. Allow the site admin to set the number or the end user to set it when viewing a page.

User interface changes

Admins or users will be able to set a number of items to display per page using pager.

Questions:

1. What numbers should be used for min/max values
2. Where do we want the validation performed?

NROTC_Webmaster’s picture

Status: Needs work » Needs review
StatusFileSize
new6.37 KB

Actually use this version.

NROTC_Webmaster’s picture

StatusFileSize
new6.37 KB

Lets hope that this is the last one.

yoroy’s picture

Pagers are pretty much antique by now :) I'd much rather abandon the pager concept wholesale and aim for infinite scroll: #1488866: Redesign pagers for administrative lists.

cafuego’s picture

Isn't infinite scroll 100% dependent on javascript?

xjm’s picture

@NROTC_Webmaster, you can put the issue summary in the issue summary (click the "Edit" tab at the top of the issue). :) Also, it would be good to have more details in the proposed resolution about the different approaches that have been suggested and the implications of each.

NROTC_Webmaster’s picture

Issue summary: View changes

Updated issue summary.

NROTC_Webmaster’s picture

Issue summary: View changes

Updated issue summary.

NROTC_Webmaster’s picture

Issue summary: View changes

Updated issue summary.

NROTC_Webmaster’s picture

The issue summary has been updated.

kattekrab’s picture

StatusFileSize
new7.34 KB

Also, infinite scroll does not help when you are trying to use the browser search function to find something in a long list of stuff.

But - I agree that the numbered list of pages also isn't generally useful in trying to guess where in a long list something might be. Pages divided alphabetically are sometimes better for that kind of thing... as in mailman.

screen grab from mailman showing alpha-based pager

salvis’s picture

Would select all work with infinite scroll? What about graceful degradation for non-JS browsers?

It seems that technology moves faster than this issue, and because we won't settle for anything but the perfect solution, we'll never see an implementation. For administrative pages (where this is really needed!), I'd be perfectly happy with having the limit in the URL.

salvis’s picture

Issue summary: View changes

Updated issue summary.

NROTC_Webmaster’s picture

Issue summary: View changes

Add alphabetical sort to the options

salvis’s picture

Proposed resolution

It would be nice to allow the site admin [...] to set how many items they want to display per page using pager.

Until we see a solution in core, the Pager Limits module does just that for D7, without requiring any core patches.

amyhribar’s picture

issue summary exists

cole.erickson’s picture

Status: Needs review » Needs work

While the latest patch adds a menu for changing the number of posts for the pager, it does not actually cause a change in the number of posts displayed. (for me, anyway)

I went to Configuration >> Pager and changed the number of posts in the appropriate field to 4, hit the save button, cleared the cache, and checked the /node page and it still pages at Drupal's default of 10 posts.

cole.erickson’s picture

Issue summary: View changes

Updated issue summary.

xjm’s picture

Issue summary: View changes

Updated issue summary.

xjm’s picture

Issue summary: View changes

Updated issue summary.

kattekrab’s picture

We missed feature freeze on this - but with views now in Core - perhaps the pager issue went somewhere else?

kattekrab’s picture

oh hello Pager issue.

Can we revisit this again now?

kattekrab’s picture

Issue summary: View changes

Updated issue summary.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

johnv’s picture

Title: provide UI on pager to change the # of things displayed per page (and allow "show all") » Pager should allow changing the "number of items per page" (and allow "show all")
Component: base system » views.module
Status: Needs work » Closed (outdated)
StatusFileSize
new54.42 KB

This is solved in ITMT in D11 (and before?)
See attached screendump.