Hello, I am a co-maintainer of views_isotope module. I would like to make it work nicely with this module, but my view has a specific set of selectors. I would like to propose a single line change to this module (patch attached), which will allow developers like me to be able to hook in and specify selectors that suit us.

For instance, the way I am utilising this patch is like this:

function views_isotope_views_views_infinite_scroll_selectors_alter(&$content_selector, &$items_selector, $plugin_name) {
  if ($plugin_name == 'isotope_grid') {
    $content_selector = 'div.view-content > div.item-list > ul.isotope-container';
    $items_selector = 'li.isotope-element';
  }
}

I can see straight away that this would resolve some of the issues over at #1806628: Support Masonry module.

CommentFileSizeAuthor
#2 integration-hook-2633928-1.patch647 bytesChris Gillis
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Chris Gillis created an issue. See original summary.

Chris Gillis’s picture

mccrodp’s picture

Status: Active » Needs review
mccrodp’s picture

Status: Needs review » Needs work

I have Views Infinite Scroll working on a regular page view with unformatted list and the "Load More" link option displays when the "Load subsequent pages manually instead of automatically" option is selected, as expected.

I have the latest 2.1 version of views_isotope, an "Isotope Grid" view with the default "Isotope Configuration". I have applied the patch cleanly to the 1.x branch of Views Infinite Scroll and the "Load More" link option is not displayed when "Load subsequent pages manually instead of automatically" option is selected.

I imagine "Load More" should be displayed, so I'm setting this back to "needs work".

Should pagination also work? I see no page link options displayed on either my regular Unformatted List view nor my Isotope Grid view. A Views Infinite Scroll bug perhaps.

Also, what is required to get views_isotope working with the latest Views Infinite Scroll branch? Perhaps I can help.

Chris Gillis’s picture

Status: Needs work » Needs review

Thanks mccrodp. If you have time to investigate further and submit an updated patch, that would be brilliant... I doubt very much that the issues you reported are due to this patch (Take a look... it's only one line - allowing other modules to hook in), so I'm going to change the status back... however it is very likely that a new ticket could be raised over at views_isotope module with a patch to ensure we are catering for all different types of functionality... I think the best person to do that is someone who is actually using it (e.g. you :)

mccrodp’s picture

Thanks for getting back so fast Chris. Yep, I'll submit a new issue over there as perhaps it is views_isotope not using the changes you made here via the patch correctly (or I'm missing something).

I'll certainly take a look at this in terms of views_isotope and provide a patch there or updated patch here if required. However, I'm not sure what views_isotope did here, or, used to do.

  1. Did the "Load More" link display and work previously?
  2. Did you have a pager working before using Views Infinite Scroll?

Currently evaluating views_isotope & views_infinite_scroll on a project which requires isotope with a pager and with #2674656: Provide UI for "Other UI" options available within Isotope library. I'm just new to both modules this week, so any help pointing me in the right direction is appreciated and I look forward to contributing.

When I know more about items discussed above, I'll be able to review this patch in practice and anything related on the views_isotope side.

EDIT: To follow up, I'm now pretty sure View Infinite Scroll does not itself provide a pager, it hides the pager in favour of "Load More" link. The View UI usage just seems a little confusing here as it mentions pager. I have followed up with my Views Infinite Scroll integration bug over in views_isotope queue: #2678826: Views Infinite Scroll integration: "Show More" not showing when Isotope Filter added to header

Chris Gillis’s picture

Just noting that this patch applies to 7.x-1.x, but does NOT apply to 7.x-2.x.

kopeboy’s picture

How to apply to 7.x-2.x?

Where to put that line of code?

I placed it in line 78: the infinite pager is still working but the new loaded items are not absolutely placed with isotope (masonry) like the ones in the first "page".

mccrodp’s picture

Honza Pobořil’s picture

Status: Needs review » Closed (outdated)

7.x-1.x will receive no work. Migrate to 7.x-2.x.