It would be nice if it was possible to start counting pager pages from 1 instead of 0. That way the pager number will be in sync with the ?page=# number. Now it is +1 ahead.

Comments

dawehner’s picture

Status: Active » Closed (works as designed)

This is how drupal works. See drupal.org as example.

tsvenson’s picture

I'm aware of that this is how Drupal works. Just hoped it was something that wasn't to complicated to add as for humans it would make more sense when looking at the URL's.

iamsquared’s picture

Dereine, many talk about making Drupal more user friendly. I respect that is works as intended. But Tsvenson has a point that humans expect the first page of a result set to be page "1" not the computer-like "0". Maybe it does "work as designed" for computers but it would be nice to see respect for making Drupal more user friendly too. Having a simple checkbox & field like, "[x] start numbering results from __" seems like what Tsvenson was asking for, and it would have the added benefit of being able to 'sync' views to something like 'nodequeue' which starts at "1", too.

merlinofchaos’s picture

Views' pager works the same way that Drupal default pagers.

Someone in contrib is free to make a pager plugin that works the way you want it to work, but this won't be in core Views. The vast majority of administrators do not care about this, so the option would simply be confusing. For those that do, that's why we have contrib and a pluggable architecture.

xpersonas’s picture

I agree that this would be a nice feature. I get that it won't be added to views and that it's how Drupal works. But it would be nice. So there are two admins and a few of my users that would like the feature. That still leaves us out of the vast majority, but figured I would second it anyway.

Dharmendra.s’s picture

i don't know how to create patch , but i have modified pager.inc file and it works fine for me..

find includes/pager.inc
function theme_pager($tags = array(), $limit = 10, $element = 0,
$parameters = array(), $quantity = 5) {
122 - $pager_current = $pager_page_array[$element] +1;
+ $pager_current = $pager_page_array[$element];
and
129 - $pager_max = $pager_total[$element];
+ $pager_max = $pager_total[$element] - 1;

yuriy.sychenko’s picture

I used your patch works for me, but there is a catch after using it, I was gone in the first page of the previous and not highlighted one active link in the pager, and when I go to a link in the one pager that I get to get on page 2.

tsvenson’s picture

Version: 7.x-3.x-dev » 8.x-3.x-dev
Status: Closed (works as designed) » Active
Issue tags: +VDC

I'm re-opening this one for 8.x and tagging it with VDC.

Reason is the same as given in #2 and #3. We should aim for improving the UX for human users/visitors, I think that is a good thing.

damiankloip’s picture

Status: Active » Closed (works as designed)

Unless this directive changes in core, this will not change in views. Even more so with VDC..

If you feel strongly about this, I would recommend maybe opening a core issue instead.

tsvenson’s picture

@damiankloip, one step ahead of you #1818040: Pager should start counting from 1, not 0

mondrake’s picture

Issue summary: View changes

I am trying to implement this in the contrib Pagerer module, see #3091945: Allow Pagerer to override the pager querystring part in URLs and count pages from 1, not 0. Reviews, tests, suggestions would be appreciated there.