Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9194505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:25:48+00:00 2026-06-17T21:25:48+00:00

I made posts feed with button which loads 10 more posts onClick. The problem

  • 0

I made posts feed with button which loads 10 more posts onClick. The problem is I don’t know when to hide that button if there are no posts left.

So I think I need to pass aditional variable in collection data (received from JSON), which tells to backbone there are more posts or not. How to receive this variable from the collection? Is it right thing to do?

Maybe there are better ways to do that without additional call to database?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T21:25:49+00:00Added an answer on June 17, 2026 at 9:25 pm

    If you absolutely need to avoid another service call, wrap your collection API response in a wrapper element which tells whether there are more posts.

    GET /posts :

    {
      more: true,
      posts: [
        {id:1, title:"..."},
        {id:2, title:"..."},
        {id:3, title:"..."},
      ]
    }
    

    And use Collection.parse to unwrap the data:

    parse: function(response) {
      this.more = response.more;
      return response.posts;
    }
    

    So you can check it from the collection:

    if(collection.more) {
      //..
    }
    

    However if your data is volatile, i.e. it would be possible for new posts to be created while the user is on the page, this would mean that the user would not be able to load more posts, after they have once reached the end of it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For this university project I'm doing (for which I've made a couple of posts
I have made a jQuery script that loads items from the database when the
There is a table Post in my database which contains posts of different users.
tl;dr: Is there a certain way to retrieve the posts made to a page,
Can you tag people in posts made via JS SDK Feed Dialogs? Particularly in
I am using the Moodle database to query the latest forum posts made by
I made a research and all posts here are very blury regarding this issue.
I've made a little forum and I want parse the date on newest posts
How do you use cakephp to count, for example the number of posts, made
I had a different problem first, so I made this post: Java JPanel mouse

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.