-
- 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!
-
- 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