Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, this patch add a checkbox to endless scroll's pager options in views ui to disable autoload and use a More link to load (more) content in the page.
The More link is added via javascript preserving the original pager when javascript is not enabled.
The code could use some polishing and some enhancements (More text is not translatable atm) but the patched module is working fine, at least for now.
If somebody is willing to help we could build a useful improvement to this module.
Comments
Comment #1
Remon CreditAttribution: Remon commentedThanks for your efforts :) , I'll check this patch out and see what I can do.
Comment #2
Remon CreditAttribution: Remon commentedHonestly I think that a more link is out of the scope of this module, if someone wants to disable infinite scrolling, it should be better disabling this module all together.
Comment #3
rodrigoaguilerathe functionality is similar but reacting to a "more" link instead of the scrolling event. I can't find any other module to do this. it's a nice way of paging but if you have something at the bottom of the page it's ignored
Comment #4
tdway CreditAttribution: tdway commentedThis would be a great feature. Subscribing.
Comment #5
meishme CreditAttribution: meishme commented+1
This would be useful. Now if only the patch on top worked with D7.
Comment #6
Remon CreditAttribution: Remon commentedI think it deserves some love.
Comment #7
vimalramaka CreditAttribution: vimalramaka commentedsubscribe. Drupal 7 version deserves some love too!
Comment #8
EndEd CreditAttribution: EndEd commentedsubscribe
Comment #9
gratefulsk CreditAttribution: gratefulsk commented+1
This would be awesome for Drupal 7.
Comment #10
rodrigoaguilerathis is solved in this module http://drupal.org/project/views_load_more
and have support for infinite scrolling with the waypoints modules
but since the functionality is similar I think the modules should be merged ¿Should I open an issue for this?
Comment #11
cableman0408 CreditAttribution: cableman0408 commentedI have create a patch for this module 7.x version that allows the user to select automatically scroll or scroll by clicking an user defined link (the option is available in the views UI).
(Removed comment about the other module)
Comment #12
rodrigoaguileraNot very apropiate to disclose here but you have to enable ajax with views_load_more on the view you want to paginate.
If this patch works both modules will have duplicate functionality
Comment #13
Hydra CreditAttribution: Hydra commentedsub
Comment #14
mh86 CreditAttribution: mh86 commentedre-rolled patch from #11 that works with drush
Comment #15
mh86 CreditAttribution: mh86 commentedactually it wasn't the patch, rather may drush definition
Comment #16
aa2007 CreditAttribution: aa2007 commentedPlease include this patch in the next release.
Comment #17
Hydra CreditAttribution: Hydra commentedThe patch isn't aplying against the dev version. With patch -p1 it's kinda working, but the link option doesn't work for me...
I would like to see this in the next release as well, defenetly usefull!
Comment #18
betovargTried to apply the patch with -p1 in #14 and got:
So, I get the UI option in views infinite scroll pager, but actually it does not work: load more link does not appear, it keeps loading more as I scroll down.
Comment #19
svenaas CreditAttribution: svenaas commentedI would very much like to see this working with Drupal 7.x.
Comment #20
svenaas CreditAttribution: svenaas commentedMy use case is slightly different from the one described above, but in case it's useful to anyone else working on related problems I wanted to share the patch I wrote (against 7.x-1.x-dev) for my current project: when the view is initially displayed the infinite scroll autopager is not enabled. Once the more button is clicked (labeled "View All" in my current project) the more button is hidden and the infinite scroll autopager takes over.
Comment #21
avolve CreditAttribution: avolve commentedI tried to apply the patch in 20 (unsuccessfully) as I wanted to see if it fit my use case...
What I was hoping for was an option to either autoload (as this module does very well — much thanks), or a load more link that would load more nodes on the same page. This would be set in the views settings.
The reason for the latter is for a mobile theme with navigation located below main content, users can't get there without more content being loaded.
There is a similar issue for a footer — might need to rethink site design. I still think this would be a nice option for this module
[I have tried views load more and waypoints — the combination seems to dynamically load two pages worth of content, then a new page]
Comment #22
revagomes CreditAttribution: revagomes commentedI tried applying the #14 patch with git but no success so I tried using
patch -p1
and I've got the same error as @betovarg said.The #20 patch didn't worked to me also.
Here goes my version of the patch.
Comment #23
revagomes CreditAttribution: revagomes commentedChanging the status to needs review.
Comment #24
revagomes CreditAttribution: revagomes commentedWith typo correction and improvements on pager settings form.
Comment #25
kolier CreditAttribution: kolier commented#24 works well +1
Comment #26
kolier CreditAttribution: kolier commentedThis patch implementation breaks in some theme.
This one works more wildly: https://drupal.org/node/1942142
Comment #27
Spanners CreditAttribution: Spanners commented#24 worked for me.
Comment #28
diegops CreditAttribution: diegops commented#10 works well
Comment #29
Honza Pobořil CreditAttribution: Honza Pobořil as a volunteer commented