I created a collection by adding items to the Varien_Data_Collection collection object.
$collection = new Varien_Data_Collection(); foreach($array_of_products as $productId){ $collection->addItem(Mage::getModel('catalog/product')->load($productId)); }
However, when this object is passed to the Magento pager block, as shown below, it breaks the pagination on my user page.
$pager = $this->getLayout()->createBlock('page/html_pager', 'retailerfe.analysis.pager') ->setCollection($collection);
PS I have never had problems with collections extracted from model collections, such as Mage :: getModel ('module / modelname') β getCollection (). These are simply collections created by adding elements to the Varien_Data_Collection object.
source share