"Some" Pager Plugin and [view:total-rows] Regression Issue

Created on 16 October 2024, 6 months ago

Problem/Motivation

The solution to ๐Ÿ› [view:total-rows] problem in Display a 'Specified number of items' pager Postponed: needs info introduced the following regression related issues:

  1. ๐Ÿ› More link is missing in pager when using the "Some" pager and there are more records than shown Needs work
  2. ๐Ÿ› More link disappears when time-based views cache is enabled Needs work

Before these issues can be fixed, I believe a decision needs to be made as to what exactly the [view:total-rows] token should return based on the pager selected and other display configurations, as this will affect how these issues are solved.

The description of the [view:total-rows] token is The total amount of results returned from the view. The current display will be used..

๐Ÿ› [view:total-rows] problem in Display a 'Specified number of items' pager Postponed: needs info interpreted that to be the total number of results returned from the query which can be limited by the pager. So if I am using the Some pager and only displaying 5 results when there are say 20, [view:total-rows] should only return 5.

But what if I have a "More link" enabled and I want to add text to the View header that says "Displaying 5 of 20". I believe this is a valid need but can no longer be done because of the changes in ๐Ÿ› [view:total-rows] problem in Display a 'Specified number of items' pager Postponed: needs info .

So if a "More link" is enabled should [view:total-rows] return the total number of results ignoring any limits applied by the "Some" pager, which in the above example be 20? Or should it always the number of results of the "Some" pager limited query, which is the current functionality?

Proposed resolution

I propose the [view:total-rows] token return the total number of results ignoring any limits applied by the "Some" pager if the "More link" is enabled.

I believe this would result in an easier fix to the related regression issues, and possibly make more sense given what is being displayed by the View. If this is the approach pursued, then I think the [view:total-rows] token description needs to be updated to provide more information on what if can be affected by.

Remaining tasks

  1. Determine how the value returned from [view:total-rows] token should be affected by the "Some" pager and More link.
  2. Based on the decision of #1 determine other remaining tasks i.e. token description update, tests, new token.
๐ŸŒฑ Plan
Status

Active

Version

11.0 ๐Ÿ”ฅ

Component

views.module

Created by

๐Ÿ‡จ๐Ÿ‡ฆCanada tame4tex

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024