Pager toolbar for any Collection

This code will call the toolbar block, pass your collection (previously created) and display the pagination links. It will correctly page through your collection.
$toolbar = $this->getLayout()->createBlock('catalog/product_list_toolbar', microtime());
$toolbar->setCollection($yourCollection);
echo $toolbar->toHtml();
Original Source: Snippi.net by jonpday

Related Posts:

Comments (6)

    • March 5, 2011 at 7:28 am

    Did not work for me !!!!!!

    Reply

    • March 25, 2011 at 5:15 am

    Nice snippet!
    How I can load the toolbar with the pager ?

    Thanks,
    Adrian

    Reply

  • Hi Moeed,

    Can you provide more details about the problem that you are having ?

    Reply

    • March 29, 2011 at 9:15 am

    Do you have any ideea why is not showing the pager in the toolbar?

    Reply

    • @Adrian Pironescu,

      If you want I can take a look at your code. Please include your phtml and current magento version in an email to info [at] allanmacgregor.com

      Reply

Post A Comment