Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //Get current category url
- $current_category = Mage::registry('current_category')->getUrl();
- //Get brandname
- $brandname = Mage::getModel('catalog/product')->load($_product->getId())->getAttributeText('manufacturer');
- //Strip .html and add the stuff from the layered navigation to it
- $brandurl = str_replace(".html", "/l/". strtolower($brandname) .".html", $current_category);
- $brandnamemurl = "of <a href="" . $brandurl . "">" . $brandname . "</a>";
- //breadcrumb stuff
- $breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
- $breadcrumbs->addCrumb('manufacturer', array('label'=>$brandnamemurl, 'title'=>$brandname));
- echo $this->getLayout()->getBlock('breadcrumbs')->toHtml();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement