Combination of infinite scroll and manual load link

Created on 3 June 2016, over 8 years ago
Updated 23 August 2024, 3 months ago

Out of the box Views Infinite Scroll does what it promises: infinite scrolling of Views results. The issue we are having with this module is that the site footer (or whatever content is below the results) can never be reached, since new results keep on being loaded. IMO this is a concerning usability issue.

The module does provide the option for a manual load link, but this completely removes the infinite scrolling. In fact, turning on this option just mimics what https://www.drupal.org/project/views_load_more does.

I wrote a patch which fixes this issue and combines infinite scrolling with a manual load link. 2 extra configuration options appear once you enable the manual load option:

  • Manual load start: the number of pages that may be loaded by scrolling the window before they must be manually loaded using a link. By default this value is 0, which means the link appears immediately.
  • Manual load repeat: instead of repeating the manual load link on each subsequent page, an interval can be configured. For example: if configured to be 5, the link will appear every 5th page (starting from the first time the link was displayed). By default this value is 0, which means the link appears on every page. This option takes 'Manual load start' into consideration.

Any chance of this functionality being part of the module?

Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

🇧🇪Belgium rp7

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇫🇷France erwangel

    I know this is an old tree but I think it's time to wake it up. As the patch is for 7.x which comes to end of life, I changed version to 2.0. Any chance to see this feature ported to views_infinite_scroll 2.0 (Drupal > 10) ? Combining infinite scroll and manual load link is a really useful feature especially for sites having a lot of pages and could complete the "Initially load all pages up to the requested page" option which can lead to page crash if the requested page is a high number.

Production build 0.71.5 2024