I need to find a way to add breadcrumbs to pages which are created by Layered Navigation, for instance if you'd click on a certain brand name the brand name is missing in the breadcrumbs.
You can test it here, http://www.onyourface.nl/vrouw-zonnebrillen/ and then choose a brandname on the right, so for example Prada: http://www.onyourface.nl/vrouw-zonnebrillen/l/prada
What I tried to do was coming from a different angle, I tried loading a different template for those pages so that I could add the breadcrumbs manually. I explained that angle here How to create a different template for catalog_category_layered
I thought I was close when I added the following code to the category/list.phtml
$current_category = Mage::registry('current_category')->getUrl();
$category_name = Mage::registry('current_category')->getName();
$catnamemurl = "<a href=\"" . $current_category . "\">" . $category_name . "</a>";
foreach ($_productCollection as $_product):
$brandname = Mage::getModel('catalog/product')->load($_product->getId())->getAttributeText('manufacturer');
endforeach;
//breadcrumb block stuff
$breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
$breadcrumbs->addCrumb('category', array('label'=>$catnamemurl, 'title'=>$category_name));
$breadcrumbs->addCrumb('manufacturer', array('label'=>$brandname, 'title'=>$brandname));
$breadcrumbblock = $this->getLayout()->getBlock('breadcrumbs')->toHtml();
echo html_entity_decode($breadcrumbblock);
But then, of course, you would see the manual breadcrumbs on the category list as well, but it should only show when someone clicks on a brand name, so that's when I thought maybe if the brand name link would load a different template than the normal category list I would've solved my problem, but I never got that to work.
I would be entirely grateful if someone could help me in the right direction.
Thanks in advance and for taking the time to read this chaotic/messy thread.