Hi, I just downloaded the paginate package. Do you have a working example of the paginate package? I set it up using but I cannot seem to get it to work. BTW, I have the following:
$table = new Riskle_Db_Table_Paginate(new Episode, $this->_getParam('page')); // Table is a class extending Riskle_Db_Table
$orderBy = "created_at DESC";
$this->view->assign('rowset', $table->fetchAll(null, $orderBy)); // fetchAll's signature is unmodified
view:
<?php $this->paginate($this->rowset); // initializes the helper ?>
<div id="navigation">
<?php
echo $this->paginate()->previous(); // displays a "previous link" if available
echo $this->paginate()->navigation(); // displays the list of pages
echo $this->paginate()->next(); // displays a "next link" if available
?>
</div>
Hi, I just downloaded the paginate package. Do you have a working example of the paginate package? I set it up using but I cannot seem to get it to work. BTW, I have the following:
bootstrapper:
require_once 'Riskle/Db/Table.php'
$view = new Zend_View;
$view->setHelperPath( './library/Riskle/View/Helper', 'Riskle_View_Helper');
Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer')->view = $view;
controller:
$table = new Riskle_Db_Table_Paginate(new Episode, $this->_getParam('page')); // Table is a class extending Riskle_Db_Table
$orderBy = "created_at DESC";
$this->view->assign('rowset', $table->fetchAll(null, $orderBy)); // fetchAll's signature is unmodified
view:
<?php $this->paginate($this->rowset); // initializes the helper ?>
<div id="navigation">
<?php
echo $this->paginate()->previous(); // displays a "previous link" if available
echo $this->paginate()->navigation(); // displays the list of pages
echo $this->paginate()->next(); // displays a "next link" if available
?>
</div>
Is there something that I'm missing?
Thanks in advance,
-Conrad