Amigos,Paginación en Zend
Quiero crear paginación en Zend Framework. Soy nuevo en ZF.
index.phtml se da a continuación
<table>
<tr>
<th>Name</th>
<th>Quantity</th>
<th> </th>
</tr>
<?php foreach($this->orders as $order) : ?>
<tr>
<td><?php echo $this->escape($order->name);?></td>
<td><?php echo $this->escape($order->quantity);?></td>
<td>
<a href="<?php echo $this->url(array('controller'=>'index','action'=>'edit', 'id'=>$order->id));?>">Edit</a>
<a href="<?php echo $this->url(array('controller'=>'index', 'action'=>'delete', 'id'=>$order->id));?>">Delete</a>
</td>
</tr>
<?php endforeach; ?>
</table>
<p><a href="<?php echo $this->url(array('controller'=>'index','action'=>'add'));?>">Add new album</a></p>
Mi controlador de índice está por debajo
class IndexController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
$this->view->title = "My Orders";
$this->view->headTitle($this->view->title, 'PREPEND');
$orders = new Model_DbTable_Orders();
$this->view->orders = $orders->fetchAll();
}
}
me dieron una respuesta y lo intenté y sólo obtengo output.I parciales am crear un 'pagination.phtml' y se almacenan en 'views/scripts /' y añadir a la recta dada en mi índice .phtml '$ this-> paginationControl ($ this-> paginator,' Sliding ',' pagination.phtml ') ;. Pero solo se muestran los primeros 10 elementos, no se muestran los siguientes enlaces previos.¿Cómo lo resuelve? – Rakes