Magento Forum

   
How to show breadcrumbs ? how to add breadcrumbs ? 
 
kalote
Jr. Member
 
Total Posts:  13
Joined:  2007-12-04
 

Hello all,
I have a problem with the breadcrumbs functionnality : i want to add it to my page (dynamic, catalog style), but even in adding the breadcrumbs.phtml file in ‘page/html’ into the layout, i can’t see the breadcrumbs on my page.
Someone could help me please ??

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michael
Enthusiast
 
Total Posts:  826
Joined:  2007-08-31
 

Hi kalote,

class Mage_Catalog_Block_Breadcrumbs extends Mage_Core_Block_Template
{
    
protected function _prepareLayout()
    
{
        
if ($breadcrumbsBlock $this->getLayout()->getBlock('breadcrumbs')) {
            $breadcrumbsBlock
->addCrumb('home',
                array(
'label'=>__('Home'), 'title'=>__('Go to Home Page'), 'link'=>Mage::getBaseUrl())
            );

            
$title = (string)Mage::getStoreConfig('system/store/name');
            
$path Mage::helper('catalog')->getBreadcrumbPath($this->getCategory());
            foreach (
$path as $name=>$breadcrumb{
                $breadcrumbsBlock
->addCrumb($name$breadcrumb);
                
$title $breadcrumb['label'].' '.Mage::getStoreConfig('catalog/seo/title_separator').' '.$title;
            
}
            
if ($headBlock $this->getLayout()->getBlock('head')) {
                $headBlock
->setTitle($title);
            
}
        }
        
return parent::_prepareLayout();
    
}

}

Isn’t this the thing you are looking for ?

Please let me know if it helps.

Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mangavod
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2007-11-29
 

Hi,

the “home” doesn’t work… error 404.
How to configure the ‘link’=>Mage::getBaseUrl())

getBaseUrl()) links to : http://www.mydomain/magento and it doesn’t work even if the index.php is online at the root of the directory Magento.

Any help, please.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michael
Enthusiast
 
Total Posts:  826
Joined:  2007-08-31
 
Mangavod -

links to : http://www.mydomain/magento and it doesn’t work even if the index.php is online at the root of the directory Magento

What is your Magento home page link ?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top