We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49667
    • 59 Posts
    Hi Guys,

    Does anyone have any experience with implementing infinite scrolling (and possible Ditto) on Modx Evo??

    I am looking to dynamically load articles on my home-page from different articles category pages on my site. And then have the reader infinitely scroll down for more (with article most recent publication date coming first)... boredpanda.com exhibits what I am after.

    I have looked at:
    - Paul Irish InfiniteScroll
    - Philip Klauzinski JScroll
    - Infinite-Ajax-Scroll plugin

    I cannot get any of these to work. Preferably I would like to work it with Ditto.

    Any tips, pointers, advice or useful links would also be appreciated to get me on the right track. After days working on this, I am quite lost now.

    Thank you for showing me the light!
      • 9995
      • 1,613 Posts
      Never tried but its pritty interesting.
      I guess when looking at the one: http://jscroll.com
      This should be doable when you know how to get the next ditto alias:

      <div class="scroll">
          <h3>[+pagetitle+]</h3>
          <p>[+introtext+]</p>
          <a href="here-not-id-but-id-of-next">next page</a>
      </div>
      



      Thinking of this you might be able to do this with below ditto tpl's?
      I'm a bit freestyling here, rethinking of this it only adds 1 extra item and it might not work lol hmm..


      <div class="scroll">

      (tplFirst)
      <div>
          <h3>[+pagetitle+]</h3>
          <p>[+introtext+]</p>
      



      (tpl)
          <a href="[~[+id+]~]">next page</a>
      </div>
      <div>
          <h3>[+pagetitle+]</h3>
          <p>[+introtext+]</p>
      



      (tplLast)
      <div>
          <h3>[+pagetitle+]</h3>
          <p>[+introtext+]</p>
      </div>
      


      </div>
        Evolution user, I like the back-end speed and simplicity smiley
        • 23610
        • 37 Posts
        Hi there.
        Long time ago I found this one.
        It worked then. Probably need some updating now.
        http://web.archive.org/web/20120126224658/http://modxrules.com/articles/infinite-scroll-with-ditto
          • 49667
          • 59 Posts
          Hi fourroses666,

          Thank you for your reply.

          I was actually free-falling instead of freestyling... smiley
          But things are looking better now.

          I managed to get infinite scrolling (I picked Infinite-Ajax-Scrolling for SEO reasons instead of JScroll though) perfectly working with articles in HTML template, however converting it to Modx Evolution template is a bit of a struggle as I am new to it.

          Once I get it all up and running, I let you know.

          Thanks again.