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.
The core issue #2349775: Remove classes from Views templates added a slight change to class names. Rather than pager__items
the class on the ul
tag will need to be js-pager__items
.
Comment | File | Size | Author |
---|---|---|---|
#2 | views-load-more-pager-class-2543714-02.patch | 1.46 KB | jhedstrom |
Comments
Comment #1
jhedstromComment #2
jhedstromThere was one more instance of a class name change needed.
Comment #3
hctomThe patch from #2 worked like a charm and applies without error, thanks ;) I tested it with Drupal 8.0.1.
Comment #4
nicholasThompsonThis has applied cleanly for me, however none of my views have the .view-content wrapper around the rows which this requires. This means the JS fails to replace my conent as it cannot find anything in the new_content response.
My solution was:
1) Override views-view.html.twig for my view to add a
<div class="view-content"></div>
wrapper around{{ rows }} {{ empty }}
2) Change my view to look for
.view-content
instead of> .view-content
Comment #5
KarenS CreditAttribution: KarenS at Lullabot commentedAfter lots of wondering why .view-content sometimes is there and sometimes is not, it turns out that wrapper is added in the classy theme. So if you use classy or a classy sub-theme you'll see a wrapper with .view-content . If you don't, you won't. So it's not safe to add it to the module because for many people it will be there. If it's missing you need to add a copy of the views-view template to your theme, using the one in the classy theme as your example. My guess is that other views modules will break without all the usual views wrappers added by the classy template as well, so it would be best to be sure it's there.
Comment #6
GrimreaperHello,
Thanks, it works well with the patch.
I also encountered a problem with the class .view-content not present because I used the HTML/CSS provided by non-Drupal mock-ups. But thanks to the possibility to configure the targeted element, it works.
Comment #7
Arne Slabbinck CreditAttribution: Arne Slabbinck commentedI had an issue that Drupal wouldn't use ajax at all for loading more nodes, patch #2 fixes that, thanks!
Comment #8
jaxxed CreditAttribution: jaxxed at Wunder commentedStill using this patch
Comment #9
aschiwi CreditAttribution: aschiwi at undpaul commentedAny plans to commit this? We are also using the patch.
Comment #10
zalak.addweb CreditAttribution: zalak.addweb commentedComment #11
DiDebruThx for the patch :)
Comment #12
DiDebruComment #13
joekersThanks for the patch - the module is working well with it.
Comment #14
dddbbb CreditAttribution: dddbbb as a volunteer commented1.5 years later, patch #2 still works and is still required. Commit?
Comment #15
loopduplicateLooks like this has been implemented already. Moving the status to Fixed.
Comment #17
volkerk CreditAttribution: volkerk at Thunder commentedI am sorry, but I can not make out where this would be implemented? We are still using this patch.
@loopduplicate: Could you please point that out to me?
Comment #18
joekersI can't spot it but it's not possible to make the issue active again, only a maintainer can do this.