public function indexAction() { /** * Form cadastro */ $formProjetoCadastro = new Form_Site_ProjetoCadastro(); $formProjetoCadastro->submit->setLabel("CADASTRAR"); $this->view->formProjetoCadastro = $formProjetoCadastro; /** * Busca as projetos */ $page = $this->getRequest()->getParam('page', 1); //get curent page param, default 1 if param not available. $modelProjeto = new Model_DbTable_Projeto(); $data = $modelProjeto->getQuery(); $adapter = new Zend_Paginator_Adapter_DbSelect($data); //adapter $paginator = new Zend_Paginator($adapter); // setup Pagination $paginator->setItemCountPerPage(Zend_Registry::get("config")->resource->rowspage); // Items perpage, in this example is 10 $paginator->setCurrentPageNumber($page); // current page //Zend_Paginator::setDefaultScrollingStyle('Sliding'); //Zend_View_Helper_PaginationControl::setDefaultViewPartial('partials/pagination.phtml'); $this->view->projetos = $paginator; }