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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...

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.