2

I am using ExpressionEngine 2.5.2 and would like to create, for lack of a better phrase, "vertical pagination" for my channel entries. This would be similar to infinite scrolling, but instead of more entries loading automatically, I would like the user to have to click a "more entries" link. Currently my homepage shows 6 blog posts, and when someone clicks "more entries," I'd like 6 more entries to show up below the 1st 6.

My reason for this is that I would like to user to always be able to reach my website's footer containing links no matter how far down the page they are, but also not have to have another page load like regular pagination does.

I have no clue where to even start with this, and I am not fluent with jquery. Is there a plugin that does this? Is there a tutorial I can check out? Thanks for the help.

3 Answers 3

1

Justin Long posted an article a while back about how to add infinite scrolling to paginated pages.

http://iamjustinlong.com/blog/single/implementing_infinite_scroll_in_your_expressionengine_site/

Near the end he explains how to add the extra entries when clicking a link, as opposed to just scrolling.

0

You can do this with jQuery's .load().

If you have an ExpressionEngine template/URL for your blog that supports pagination, the output of which is just the HTML of the entries with no outer HTML/DOM, you're just loading chunks of HTML in per "page".

You could increment a counter each time the user clicks the link, and multiply that by your offset for your pagination offets.

click = 1;
pagination = click*10 = 10;
.load('/blog/more-entries/P'+pagination);
click++;

That would load the following URLs with each click:

/blog/more-entries/P10
/blog/more-entries/P20
/blog/more-entries/P30
...
0

Maybe you could use this: Infinite Scroll http://devot-ee.com/add-ons/infinite-scroll

1
  • I had linked to that first too and then deleted that answer as the original poster said they did not want infinite scroll to keep the footer from being accessible. All of the demo links are down on that add-on, so I'm not sure it's status or what it supports. Commented Feb 8, 2013 at 19:11

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.