I need to customize the list display only for the home page. I've duplicated catalog/produtcs/list.phtml to catalog/produtcs/list_home.phtml and in the home page content, in the CMS section of the admin I've added the code:

{{block type="catalog/product_list_home" name="home.catalog.product.list" alias="produtos_home" template="catalog/product/list_home.phtml"}}

But that just didn't load anything. How do I register this "new" block?

Thanks in advance.

  • Does the block with the alias catalog/product_list_home exist?
    – Marius
    Dec 12, 2014 at 12:32
  • I'm sorry I'm noob with Magento, where do I create it? Dec 12, 2014 at 12:34
  • What products are you trying to display on the homepage? Is there a special category that contains these products?
    – Marius
    Dec 12, 2014 at 12:37
  • The last 8 products, no specific category. Dec 12, 2014 at 12:38

2 Answers 2


To create the collection for the latest 8 products, in list_home.phtml replace this (should be at the start of the file):


with this:

$_productCollection= Mage::getModel('catalog/product')
                ->addAttributeToSort('created_at', 'desc');   

Then in your CMS page:

{{block type="catalog/product_list_home" name="home.catalog.product.list" alias="produtos_home" column_count="4" template="catalog/product/list_home.phtml"}}

Please take note of the column_count="4" parameter inside the block declaration, you can change this to suit your theme.


You need a new module for that.
Let's call it Easylife_Homepage. Create these files:

app/etc/modules/Easylife_Homepage.xml - the declaration file

<?xml version="1.0"?>
                <Mage_Catalog />

app/code/local/Easylife/Homepage/etc/config.xml - the configuration file

<?xml version="1.0"?>

app/code/local/Easylife/Homepage/Block/Homepage.php - your block that gets the last added products

class Easylife_Homepage_Block_Homepage  extends Mage_Catalog_Block_Product_Abstract
    protected $_products = null;
    public function getProductLimit()
        return $this->getDataSetDefault('product_limit', self::DEFAULT_PRODUCT_LIMIT);
    public function getLoadedProductCollection()
        if (is_null($this->_products)) {
            $products = Mage::getModel('catalog/product')->getCollection()
                ->addAttributeToSort('entity_id', 'DESC')
                ->setPage(1, $this->getProductLimit());
            $this->_products = $products;
        return $this->_products;

Now clear the cache and add this to the homepage content

{{block type="easylife_homepage/homepage" template="catalog/product/list_home.phtml"}}

Save and enjoy.
If you later decide you don't want 8 products but you want 10 just modify what you added in the homepage content to this:

{{block type="easylife_homepage/homepage" template="catalog/product/list_home.phtml" product_limit="10"}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.