Ver Mensaje Individual
  #8 (permalink)  
Antiguo 27/09/2010, 22:57
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años, 8 meses
Puntos: 2135
Respuesta: Paginación con ZF

Pues solamente cambia el método de tu formulario a que sea GET y al dibujar tus links de paginación pasando los parámetros, yo lo que hice es crear un helper para eso:
Código PHP:
Ver original
  1. class Admin_View_Helper_UrlParameters extends Zend_View_Helper_Abstract
  2. {
  3.     public function urlParameters($page)
  4.     {
  5.         $front = Zend_Controller_Front::getInstance();
  6.         $request = $front->getRequest();
  7.        
  8.         $params = $request->getParams();
  9.         $params['page'] = $page;
  10.         return $this->view->url($params);
  11.     }
  12. }

Posteriormente lo uso en mis paginaciones:
Código PHP:
Ver original
  1. <?php if ($this->pageCount): ?>
  2. <div class="paginationControl">
  3. <!-- Previous page link -->
  4. <?php if (isset($this->previous)): ?>
  5.   <a href="<?php echo $this->urlParameters($this->previous); ?>">
  6.     &lt; Anterior
  7.   </a> |
  8. <?php else: ?>
  9.   <span class="disabled">&lt; Anterior</span> |
  10. <?php endif; ?>
  11.  
  12. <!-- Numbered page links -->
  13. <?php foreach ($this->pagesInRange as $page): ?>
  14.   <?php if ($page != $this->current): ?>
  15.     <a href="<?php echo $this->urlParameters($page); ?>">
  16.         <?php echo $page; ?>
  17.     </a> |
  18.   <?php else: ?>
  19.     <?php echo $page; ?> |
  20.   <?php endif; ?>
  21. <?php endforeach; ?>
  22.  
  23. <!-- Next page link -->
  24. <?php if (isset($this->next)): ?>
  25.   <a href="<?php echo $this->urlParameters($this->next); ?>">
  26.     Siguiente &gt;
  27.   </a>
  28. <?php else: ?>
  29.   <span class="disabled">Siguiente &gt;</span>
  30. <?php endif; ?>
  31. </div>
  32. <?php endif; ?>

Saludos.