I am working on a project where one of my views is wrapped by the jQuery cubeportfolio grid plugin, and started experimenting with this infinite scroll module in order to improve page load performance.

Quickly came to the conclusion the infinite-scroll.js function is not appending new items to the cubeportfolio wrapper, but to the data-drupal-views-infinite-scroll-content-wrapper.

I've written the attached patch, in order to make the js aware of the cubeportfolio wrapper presence and divert the append to
http://www.8themblem.com/Online/cube/documentation/#loadMoreItems

Maybe not the most ideal implementation (could be steered by Drupal.behaviors ?), but it takes into account of both present infinite scroll and cubeportfolio wrappers.

PS. The view template in subject was overridden from within
/themes/custom/jango/templates/views/view--project/page-portfolio/views-view-grid--page-portfolio.html.twig
containing all the necessary cubeportfolio DOM elements.

CommentFileSizeAuthor
#2 cubeportfolio-load-more-2924175-2.patch1.07 KBRAWDESK
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RAWDESK created an issue. See original summary.

RAWDESK’s picture

Anybody’s picture

Status: Active » Closed (duplicate)

Please contribute to #3098132: [MASTER] Handle style plugin specific wrappers around views rows properly to find a clever solution and write tests for all core and contrib views style plugins. :)

The patch from #2 is written against concrete classes from a different module and so will never make it into views_infinite_scroll. Instead we should provide a general solution to this problem. Thank you!

inst’s picture

Hi,
can you point out how you did use cube portfolio with drupal 8 views?

thanks!