Giter Site home page Giter Site logo

Comments (13)

paulirish avatar paulirish commented on April 27, 2024

Hey pewpew,

This is true.. I think we could do two things...

  1. add docs to that page that clarify this
  2. 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.

gercheq avatar gercheq commented on April 27, 2024

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.

paulirish avatar paulirish commented on April 27, 2024

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.

Pewpewarrows avatar Pewpewarrows commented on April 27, 2024

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.

paulirish avatar paulirish commented on April 27, 2024

related: http://www.infinite-scroll.com/infinite-scroll-jquery-plugin/comment-page-2/#comment-875

from infinite-scroll.

samcleaver avatar samcleaver commented on April 27, 2024

Can we close this issue now Paul? It seems you can define your own path details.

from infinite-scroll.

Cipa avatar Cipa commented on April 27, 2024

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.

lukeshumard avatar lukeshumard commented on April 27, 2024

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.

Cipa avatar Cipa commented on April 27, 2024

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.

finsterdexter avatar finsterdexter commented on April 27, 2024

This pathParse needs some documentation. What, exactly, is supposed to be passed to pathParse?

from infinite-scroll.

lukeshumard avatar lukeshumard commented on April 27, 2024

pathParse should be a function. There will be new documentation coming soon!

from infinite-scroll.

lukeshumard avatar lukeshumard commented on April 27, 2024

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.

lukeshumard avatar lukeshumard commented on April 27, 2024

Nope, totally closed...unless someone else wants to add something to this?

from infinite-scroll.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.