Questions tagged [zend-paginator]

Zend-Paginator is a flexible component for paginating collections of data and presenting that data to users.

The primary design goals of are as follows:

  • Paginate arbitrary data, not just relational databases
  • Fetch only the results that need to be displayed
  • Do not force users to adhere to only one way of displaying data or rendering pagination controls
  • Loosely couple to other Zend Framework components so that users who wish to use it independently of , , etc. can do so
115 questions
19
votes
2 answers

How do i get row counts of Zend_Paginator object?

I am using Zend_Pagintor class with Zend_Db_Table_Abstract . Zend_Pagintor has a count() method but it always returns 1! How do i get row counts?
rahim asgari
  • 12,197
  • 10
  • 43
  • 53
11
votes
2 answers

Zend_Paginator creating issues in webpage

I am using Zend_Paginator in my web-page, where I get the same records in each page.... For Eg. I got the same 4 records in different pages...? $page=$this->_getParam('page',1); $paginator =…
Pushpendra
  • 4,344
  • 5
  • 36
  • 64
7
votes
3 answers

Zend Paginator - How can get the first element in paginator?

I have a zend paginator object, I want to get the first element in this paginator. I tried $paginator->getItem(0) but it returns the message:Message: Cannot seek to 0 which is below the offset 2. And the $paginator->count() is 19. I can achieve this…
hungneox
  • 9,333
  • 12
  • 49
  • 66
7
votes
2 answers

ZF2 paginator don't show last page

I have 6 records in query and this code correctly show it on 3 pages: (action) public function listAction() { $page = (int) $this->params()->fromRoute('id', 0); $posts = $this->getPagesTable()->selectPages(); …
morin
  • 171
  • 4
6
votes
4 answers

doctrine 2 and zend paginator

i want to use doctrine with zend_paginator here some example query : $allArticleObj = $this->_em->getRepository('Articles'); $qb = $this->_em->createQueryBuilder(); $qb->add('select', 'a') ->add('from', 'Articles a') …
Sina Miandashti
  • 2,087
  • 1
  • 26
  • 40
6
votes
2 answers

how to ajaxify zend_pagination results (already working with partialoop) using jquery

in the controller i have : $paginator = Zend_Paginator::factory($mdlPost->getPosts($this->moduleData->accordion, 'name ASC')); if(isset($params['cities'])) { $paginator->setCurrentPageNumber(intval($params['cities'])); …
jspeshu
  • 1,211
  • 3
  • 12
  • 20
6
votes
7 answers

Zend_Paginator blurring MVC lines

I'm working on a Zend Framework (1.7) project with a structure loosely based on the structure of the quickstart application - front controller, action controllers, views & models that use Zend_Db_Table to get to the database. One of my main models…
6
votes
2 answers

Zend_Paginator; is it optimized?

I am about to use Zend_Paginator class in my project. I found examples of the class on the internet. One of them is $sql = 'SELECT * FROM table_name '; $result = $db->fetchAll($sql); $page=$this->_getParam('page',1); $paginator =…
Moon
  • 22,195
  • 68
  • 188
  • 269
6
votes
1 answer

How do I retain query params in the pagination URLs in ZF2?

I am using Zend\Paginator to construct a paginated result set. This works fine, however, after adding a search form, I cannot get the two to play nicely together. The URL produced by the search form on the page is: user/index/?searchTerm=hello How…
bcmcfc
  • 25,966
  • 29
  • 109
  • 181
5
votes
1 answer

Zend_Form & Pagination

I am putting together a Zend_Form that has numerous SubForms. In fact, it has the potential to have so many subforms, I'd like them to appear on multiple pages. Is it possible to use Zend_Paginator to create a multipage form of some dynamic number…
5
votes
5 answers

how to use zend paginate without loading all the results of a database

So the way I see zend paginate work is that you do: $paginator = Zend_Paginator::factory($results); $paginator->setItemCountPerPage($itemCount); $paginator->setPageRange($pageRange); Where $results is the result of loading a bunch of items from a…
kamikaze_pilot
  • 14,304
  • 35
  • 111
  • 171
4
votes
1 answer

How do you output the Zend pagination control outside of the view?

I'm creating a wrapper class in the Zend framework to encapsulate some data output and the pagination control. How do I output this line from the view in the controller: paginationControl($this->oPaginator, 'Sliding',…
Rupert
  • 1,629
  • 11
  • 23
4
votes
2 answers

How to use zend paginate with normal sql query rather than zend_db_select

so basically you can use zend paginate via the following: $sql = new Zend_Db_Select($db); $sql->from(table); $sql->where(zend_db_select_sucks = 1); $paginator = Zend_Paginator::factory($sql); is there a way to use paginator such that you can set…
kamikaze_pilot
  • 14,304
  • 35
  • 111
  • 171
4
votes
1 answer

Issue caching Zend_Paginator with DB profiler enabled

I am having a bizarre issue when trying to cache Zend_Paginator and having the Zend_Db_Adapter profiler enabled. It creates a cache file, but each ID is different meaning that the cache hit will never happen. After disabling the profiler…
JasonDZA
  • 51
  • 3
3
votes
3 answers

How to limit the number of pagination links in Zend_Paginator

When using Zend_Paginator, I don't want it to show me all the pagination links. Here's how I am implementing it: $adapter = new Zend_Paginator_Adapter_DbSelect($result); $paginator = new Zend_Paginator($adapter); …
Edward Maya
  • 429
  • 2
  • 10
  • 25
1
2 3 4 5 6 7 8