Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    Not a very good one. If you use [cfdb-datatable] it will dump all the data in the table but show 10 and have arrow buttons at the bottom to paginate through. Change “show” at the top to change how many are displayed.

    I haven’t put an ajax call to to server-side pagination because it opens up an API that anyone could access and pull any of your data from. It would be a security hole.

    Thread Starter snackd

    (@snackd)

    That makes sense. Does it have to be ajax though? How about a php template tag that lets me pull in 200 entries at a go. Sure it would require page reload every once in a while, but it would suit my needs. Otoh, I don’t know if it’s worth anyone’s time doing that versus just writing your own database calls. Just a thought.

    Thanks for your response, and your super-useful plugin, sir!

    Plugin Author Michael Simpson

    (@msimpson)

    OK, let’s say you create your own page template.
    – In it you page have a “start” variable default to 0 and set it to the value of $_GET[‘s’] if that param is set
    – do_shortcode(“[cfdb-table form=\”your-form\” limit=\”$start,200\”]”);
    – $next = start + 200;
    – create a link to the page itself at the bottom for “next” with “&s=$next” on the URL

    does that make sense?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘pagination’ is closed to new replies.