I'm trying to put a pagination on my result.phtml file using pager.phtml file creating a custom block:
echo $this->getLayout()->createBlock('page/html_pager', 'bottom.pager')->toHtml();
But i get the following error:
Fatal error: Call to a member function getSize() on a non-object
On Magento's default structure, the function $this->getPagerHtml() is used inside the file toolbar.phtml:
/app/design/frontend/base/default/template/catalog/product/list/toolbar.phtml
This function shows the default page navigation and the toolbar.phtml file is called on:
app/design/frontend/base/default/template/catalog/product/list.phtml
by the function $this->getToolbarHtml() and the list.phtml file is called on:
app/design/frontend/base/default/template/catalogsearch/result.phtml
by the function $this->getProductListHtml().
How can i use the function $this->getPagerHtml() (or, somehow, use pagination) for paginate my results directly inside result.phtml without need of all these dependencies?