I have a custom page where I am listing the custom product collection. I am using the default catalog/product/list.phtml as template to display the page. It's listing fine like the category page. But it's missing the toolbar pager. I tried the code in the following way
<reference name="content">
<block type="customization/product_searchbycity" name="searchbycity" as="searchbycity" template="catalog/product/list.phtml">
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
</block>
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
<action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
<action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
<action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
<action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
<action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
<action method="setColumnCount"><count>4</count></action>
</block>
</reference>
And in the block
class Probytes_Customization_Block_Product_Searchbycity extends Mage_Catalog_Block_Product_Abstract
{
public function getLoadedProductCollection() {
$data['address'] = $this->getRequest()->getParam('city-to-search');
$model = Mage::getModel('customization/citysearch');
$collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*');
$collection->addAttributeToFilter('status',1)
->addFieldToFilter('visibility', Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH);
$collection = $model->searchResult($data,$collection);
return $collection;
}
}
It's not showing the toolbar pager in the custom page. I need the page like the category page. Please anyone help on this.