CMS Seamless Pagination Custom Code

I have a CMS collection set to pagination on two different pages. I have added this code to each page as this is what I found from researching:

<!-- Start seamless-pagination custom code -->

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.pjax/2.0.1/jquery.pjax.min.js"></script>
<script>
  var containerSelector = '#seamless-replace';
  $(document).pjax(
    '.w-pagination-wrapper a',
    containerSelector,
    {
      container: containerSelector, 
      fragment: containerSelector,
      scrollTo: false,
      timeout: 2500,
    }
  );
  // These 3 lines should reinitialize interactions
  $(document).on('pjax:end', function() {
    Webflow.require('ix2').init();
  });
</script>

<!-- End seamless-pagination custom code -->

The code works for the pagination on one page but not the other. Does anyone know why that might be the case?

https://preview.webflow.com/preview/apartment-list-city-pages?utm_source=apartment-list-city-pages&preview=645fbef51f06f8e7f61487ac5f9d4e37&mode=preview

Thanks!

Bec


Here is my public share link: LINK
(how to access public share link)

Hey Rebecca,

Might be because you did not limit the collection in the Seattle page.

HI @avivtech,

Thanks for the suggestion but I have not limited the collection on either page. I still tried that idea but still not working properly…

Any other suggestions would be very much appreciated.

Thanks!

Bec

Yes you did-

@avivtech Yes, I have NOW. But that was done after I read your suggestion. It was not set to this before you suggested it.

Yes it was :slight_smile:
I only wrote it because I saw it…

Try setting it also on the Seattle page

haha, ok. Whatever dude. @avivtech

El duderino :stuck_out_tongue_winking_eye:

Did you try limiting the other collection? did it work?

Hi @vincent, was curious if you could assist me on this topic?

Cheers,
Bec

Hi Rebecca, sorry, I can’t, I’m not a programmer at all.

1 Like

Hi @vincent no worries! I was able to figure it out. Cheers!

The Collection List needed an ID of seamless-replace. That’s what I was missing :slight_smile:

This is now resolved.

2 Likes