Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to set pagging in Zend Framework

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 264
    Comment on it

    Hello Guys,

    We generally need paging in all the listing pages in website. To set paging in Zend Framework, please follow the below code::

    // you need to set the below code in your controller

    $select = $db->select()->from('posts')->order('date_created DESC');
    $page=$this->_getParam('page',1);
    $pagining = Zend_Paginator::factory($select);
    $pagining->setItemCountPerPage(10);
    $pagining->setCurrentPageNumber($page);
    $this->view->reviewInformation = $pagining;
    $this->view->pagining = $pagining; 
    

    //On Html File

    <div style="margin-right:30px;">
    <?php echo $this--->paginationControl($this->pagining, 'Sliding', 'paginator.phtml'); ?>
    </div>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: