• I have one page on a client site that has a LOT of data. it’s not in a table or UL, the client made a div for each entry.

    My question is, I know I can use <!–nextpage–> to paginate his pages, but i am hoping for a more elegant solution.

    I see lots of ‘ajax load more, and infinite scroll’ but those are all meant for scrolling through entries/posts not adding it to a single page to reduce page load time and keep the page hight reasonable unless the viewer chooses more.

    Can someone think of a way to do this within a page? it’s very difficult to find something I can use within a page other than nextpage, and that isn’t really what I’m hoping for.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Thread Starter viruseater

    (@viruseater)

    Thanks for the reply. Unfortunately that won’t work.

    this is a single list with around 100 list items. though it’s not currently in a list.

    but an accordian wouldn’t really work since it all fills one page with one topic

    Thread Starter viruseater

    (@viruseater)

    maybe I should reiterate what I’m really looking for.
    I’m not talking about pagination for pages or posts. i’m talking about being able to put text into a page, and paginate the content.

    So let’s say there’s 100 items. I could put the code in every 20 items and it would paginate it.

    The tag <!--nextpage--> does this, but it doesn’t do it dynamically, it’s a page refresh every time you do it.

    I want to take that info and break it into a ‘load more’ or infinite scroll. Ajax Load More does this with pages or posts, but I don’t see a way to do it like I’m explaining.

    Everything I find has to do with pagination either full pages or posts.

    Accordians would technically work but it’s not a very elegant solution so i’m trying to avoid that

    • This reply was modified 7 years, 9 months ago by viruseater.
    Moderator bcworkz

    (@bcworkz)

    If I understand you correctly, what you want really is infinite scroll, except the source for more content is the same post content instead of more posts. The client side is identical, when the scroll gets close to the bottom, make an Ajax request for more data and append it to the end of the current content.

    The difference is the Ajax handler will get more content from the current post. It needs to keep track of where it is in the content and somehow know how much data to return each time. If it’s a list of li items, it can just return the next 20 items or whatever quantity is appropriate. It the content is unstructured, it could just return the next 1000 characters or something, but it’ll have to be smart enough to not stop in the middle of unclosed HTML tags, or even worse, stop in the middle of a tag itself.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘“load more” for a single page with lots of data.’ is closed to new replies.