Jump to content
Sign in to follow this  

Zebra pagination - removing pages

Recommended Posts


You see, I have 143 pages of data tables that I continue to add to daily with my document records, but I'd like to hide data, say on pages 1 to 140. I've tried playing around with the code and have had some wonky success, but it doesn't display data on only pages 140->forward. (I'm fine with pages 1-140 being blank and still appearing as a clickable button at the bottom of the page for selection).

On a side note, there's been an issue persistent since day 1, which is that when the limit of 20 per page has passed, until there are another 5~ or so data entries, the next page button won't appear, so I'll have to go to the URL and manually change the page number to see the new page. I'm used to it at this point.

This is my code for the particular data:

if(isset($_GET['new documents'])){
    $rows = $service->count(array('is_new'=>3));
    $page = (isset($_GET['page'])) ? $page = $_GET['page'] : $page = 1;
    $offset = ($page - 1) * $limit;
    $documents = $service->findAll(array('is_new'=>3,'limit'=>$limit,'offset'=>$offset));
    foreach ($documents as $d){
        $sid = $d->getUserId();
        $eid = $d->getDocVersion()->getuserId();

        $admin[] = $sService->findOneById($sid);

            $users[] = $eService->findOneById($eid);
            $users[] = '';
    $sectionHeading = 'New';
    include (ABSPATH . '/tmplt/doc/new.tmplt.php');



Any help would be appreciated!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.