New token for button text - Number of items currently displayed

Created on 28 October 2024, 5 months ago

Problem/Motivation

The views_infinite_scroll module does not provide a way to display the number of items currently loaded on the "Load more" button (Only how much it remains). Users may want to see how many items are currently displayed out of the total number.

Steps to reproduce

  • Install the views_infinite_scroll module and create a View using infinite scrolling.
  • Set up a "Load more" button for loading additional content.
  • Notice that there is no built-in token or option to display the current number of items loaded.

Proposed resolution

Add a token that makes the current number of displayed items available for use in the 'Load more' button text.

I already created a patch that adds this token, and I have also included the different counts in the options array making it easier for developers to use them elsewhere.

Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

🇲🇦Morocco b.rida

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

Comments & Activities

Production build 0.71.5 2024