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
    • 288
    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

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

    //On Html File

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

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Reset Password
Fill out the form below and reset your password: