Magento Breadcrumbs – Custom ‘Home’ Link

This is a quick and easy one, but useful for those who are building their Magento store as a section of a larger site.  The problem is that, by default, the Magento breadcrumbs will produce markup with the home text or icon linking through to the base url of the Magento store.  However, if your Magento installation isn’t the root of the site you won’t want this.

You can customise the home link by creating a local version of app\code\core\Mage\Catalog\Block\Breadcrumbs.php and then hardcoding the link url as below;


breadcrumbsBlock->addCrumb('home', array(
'label'=>Mage::helper('catalog')->__('Home'),
'title'=>Mage::helper('catalog')->__('Go to Home Page'),
'link'=>'http://www.yoursite.com'
));

As per tzyganu’s advice on this thread here;

http://www.magentocommerce.com/boards/v/viewthread/178468/#t227643