Use different initial display number and subsequent load number

Created on 6 January 2024, 6 months ago

Problem/Motivation

I've used this module to save some space on the page, and am using the 'load more' button so that users can access more content. It would make sense for our users if there were, say, 3 to 5 pieces of content shown... like a brief summary, but when the 'load more' button is clicked, I would like 10-15 pieces to be loaded.

This would make it faster for users to find more content as the 'load more' quantity isn't restrained by the desire to only show the users '3' pieces to start with.

Steps to reproduce

Currently if 10 items are shown 10 items are loaded, if 3 items are shown 3 items are loaded.

This is the current default behaviour. The only exceptions currently are 1; the button on the penultimate page which loads however many items are remaining, and 2; the exposable 'All' button which loads all items.

Proposed resolution

Allow site builders to define the number of items to be shown in subsequent pages, separate from the number of items displayed initially.

Remaining tasks

- Provide the setting
- Write the code which utilises the setting
- Review, testing, etc

User interface changes

After the existing setting (reworded):

"Items to display on the first page: [0]
(Enter 0 for no limit.)"

Provide the new setting:

"Items to load on each subsequent page: [0]
(Enter 0 to load the same items as the first page.)"

API changes

Data model changes

The new integer to be stored per pager.

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

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

Comments & Activities

Production build 0.69.0 2024