It's actually quite simple.
In the main block that calls your collection to render, add the following:
protected function _prepareLayout()
{
parent::_prepareLayout();
$pager = $this->getLayout()->createBlock('page/html_pager', 'your.custom.blockname.pager')
->setCollection($this->getCollection()); //call your own collection getter here, name it something better than getCollection, please; *or* your call to getResourceModel()
$this->setChild('pager', $pager);
return $this;
}
public function getPagerHtml()
{
return $this->getChildHtml('pager');
}
By default this will limit your collection to 10-at-a-time! Sweet!!
Then, from your template phtml associated to your collection, add the pager controls by echoing the output of our other method, getPagerHtml
:
<?php echo $this->getPagerHtml(); ?>
Source: Experience. And also, the sales/order_history
block in Magento.