Magento : Add custom breadcrumbs to any pages

Dear my friends,


Today I’ll write about the breadcrumbs. I’ll explain how to add breadcrumbs to your custom module (Due to default settings, your custom module doesn’t contain a breadcrumbs).
We will add links to breadcrumbs block of Magento.
Open the block that you want to add breadcrumbs then find function

public function _prepareLayout()

Then change it to:

public function _prepareLayout()
$breadcrumbs = $this->getLayout()->getBlock('breadcrumbs'); 
 $breadcrumbs->addCrumb('home', array('label'=>Mage::helper('cms')->__('Home'), 
 'title'=>Mage::helper('cms')->__('Home Page'), 'link'=>Mage::getBaseUrl())); 
 $breadcrumbs->addCrumb('an_alias', array('label'=>'Your label', 'title'=>'Your title', 

return parent::_prepareLayout();

Refresh your page and you can see the breadcrumbs like this: home/your label 

Ok, we are done !!! Please leave your comments here. 🙂

I hope this helps someone 🙂

Mayank Zalavadia  🙂