I added an extra category but i don't want to show this in the breadcrumb.
I searched for a while how i can remove a part from it and found the following solution:
In app/code/local/Mage/Page/Block/Html/Breadcrumbs.php
I added the following code:
function removeCrumb($crumbName) {
if ((!isset($this->_crumbs[$crumbName])) || (!$this->_crumbs[$crumbName]['readonly'])) {
unset($this->_crumbs[$crumbName]);
}
return $this;
}
Then ,i added the following code in app/code/local/Mage/Catalog/Block/Product/View.php
after
$this->getLayout()->createBlock(‘catalog/breadcrumbs’);
$this->getLayout()->getBlock('breadcrumbs')->removeCrumb('home');
Instead of 'home' I can use the word category + the id of the category to remove this part from the breadcrumbs.
This all works fine, but unfortunately only on the product page. When I try to do the same in app/code/local/Mage/Catalog/Block/Category/View.php
something strange happens:
instead of 'home - cat1 - cat2
' it becomes 'home - cat2 - cat1'
.
No idea why.
Does someone knows how to solve this problem for the category page?
I'm using magento 1.7.0.2