Comments (13)
Hey pewpew,
This is true.. I think we could do two things...
- add docs to that page that clarify this
- add an option to the plugin that allows you to specify exactly how to parse and increment the URL.
I'd love your help with either. Could I set you up with access to the site?
from infinite-scroll.
omg! I should have read this issue before diving into the source code... It would be better if the loading mechanism simply worked with a link that exist in each page. Then, it'd be possible to integrate this plugin without worrying about the url structure. There might be many cases where it is not possible to modify the URL (ie. large media organizations using static publishing).
from infinite-scroll.
gercheq, so the plugin does its best to guess what the story with the URL structure is.
that way you dont have to specify
but there are cases where you'd want to specify.
and thus... this ticket :)
from infinite-scroll.
Paul,
I'd definitely be happy to help with it! Let me kick around a few ideas today and I'll post back here with them.
from infinite-scroll.
related: http://www.infinite-scroll.com/infinite-scroll-jquery-plugin/comment-page-2/#comment-875
from infinite-scroll.
Can we close this issue now Paul? It seems you can define your own path details.
from infinite-scroll.
Hi,
I think I am missing something regarding Frank's comment
"Here is a patch to the jquery version which does not try to guess/calculate the next page, but actually reads it from the the next link from the content returned from ajax. "
Is there something I need to do in my config?
My next links look like
<a href='/infinite?start=5' class='ditto_next_link'>Next ></a>
<a href='/infinite?start=10' class='ditto_next_link'>Next ></a>
Is there a config option that activates reading the next page in order to get the link?
Thanks
from infinite-scroll.
there is. you can use pathParse option now to define how the plugin reads your page structure. i'll try and get a demo of this for the new site.
from infinite-scroll.
I made my own modifications at https://github.com/Cipa/infinite-scroll
I basically added support for MODX CMS with Ditto. I tried pathParse but without luck.
The thing I could not make, is get the IS page counter inside pathParse as a global variable. Basically the first next link specifies the number of items per page, so I have to save it somehow and reuse it by multipling it with the page number
Maybe it's possible with the current code but I might have missed something
from infinite-scroll.
This pathParse needs some documentation. What, exactly, is supposed to be passed to pathParse?
from infinite-scroll.
pathParse should be a function. There will be new documentation coming soon!
from infinite-scroll.
To clarify further, pathParse should be a function that returns your path, which is an array of what goes before and after your next page number.
For example, if your next page url is /page/2/
, pathParse should return ['/page/','/']
. If your next page url is index2.html
, pathParse should return ['index','.html']
.
from infinite-scroll.
Nope, totally closed...unless someone else wants to add something to this?
from infinite-scroll.
Related Issues (20)
- How can I parse the next/prev links of loaded pages? HOT 1
- standby function with sticky footer HOT 1
- infinite-scroll with websockets
- tile HOT 1
- Items shown and total items under view more button HOT 3
- Fackbook hack
- Infinite scroll + JSON
- Cloudflare mirage data-cfsrc lazy load conflict
- my tumblr theme's images not loading after page 1 (Safari only) - Infinite scroll & load more issue HOT 3
- Feature - Combination with Pagination - Load and Scroll to specific Page
- Page Link Issue
- Card Columns Not Working
- Web App For Iqama status
- Infinite-scroll and Joomla
- View Transitions
- Infinite Scroll + Masonry works only sometimes, sometimes it bugs HOT 1
- prefill loads data endlessly when container has display:none HOT 2
- Deprecating the unload event HOT 2
- Rating of a topic and infinite scroll HOT 1
- Want to create website tool for BCBS Prefix List HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from infinite-scroll.