1

I want to use the load more module on a view. The problem I'm having is that I'm using a mp3 player that generates a player based on the number of posts on a page. Example: my page has 10 nodes so 10 players are generated. When I click on load more posts using the Views load more module, 10 more nodes are generated. So now my page has 20 nodes but only 10 players.

This problem doesn't occur if I use the default pager and click on the next page.

Is there a way to load all nodes but only show x number of nodes per page in a view?

3
  • 1
    You could page the content instead of using the views_load_more, the default views module has the pager settings already there for this. In your case (I'm guessing at this) I'm assuming you have some JS that generates the players, so you probably want to turn off Ajax on the view unless you want to write the JS callbacks needed to generate new players when the Ajax is loaded. It would also cut a module out of your workflow which IMHO is probably better :) Commented Jul 12, 2015 at 0:56
  • Thanks! I gave up and just do the default pagers and not use the load more module. Commented Jul 12, 2015 at 6:57
  • NP, If I knew a little bit more about how the JS was implemented for the MP3 player (if it's done with JS) it wouldn't be hard to run the JS when the new content is appended but you are definitely probably making the wiser choice ATM, you can always come back later to do the fancy things :) Commented Jul 12, 2015 at 7:22

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.