将分页添加到自定义Magento目录

I have this code, and i need some help to add pagination to this code.

function __construct() { 
        $category = Mage::getModel('catalog/category');
        $products = Mage::getResourceModel('catalog/product_collection')
                  ->AddAttributeToSelect('name')
                  ->addAttributeToSelect('price')
                  ->addFinalPrice()
                  ->addAttributeToSelect('small_image')
                  ->addAttributeToSelect('image')
                  ->addAttributeToSelect('thumbnail')
                  ->addUrlRewrite()
                  ->AddCategoryFilter($category);
        Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
        $currencyCode = Mage::app()->getStore()->getBaseCurrencyCode();
        foreach($products as $product){ 

            echo $product->getId()."<br>";
            echo $product->getName()."<br>";
            echo Mage::helper('core')->currency($product->getPrice(), true, false)."<br>"; //." ".$currencyCode,
            echo $product->getProductUrl()."<br>";
            echo "<img src='".(string)Mage::helper('catalog/image')->init($product, 'thumbnail')."' alt='product'><br><hr>";

        }


    } 

How I can add pagination ? Thanks )