Friday, August 26, 2011

Magento Pagination Without Toolbar?

Add the below code to your end of "template/catalog/product/list.phtml" file.
<?php 
   // manually get the toolbar block so we can do the page navigation
   $toolbar = $this->getToolbarBlock();
   $toolbar->setCollection($_productCollection);
   if($toolbar->getCollection()->getSize() > 0):
      echo $toolbar->getPagerHtml(); //Pager
      echo $toolbar->__('Items %s to %s of %s total', $toolbar->getFirstNum(), $toolbar->getLastNum(), $toolbar->getTotalNum());
   endif;
?>
Thats it. It will work perfectly.

1 comment: