一:
<reference name="breadcrumbs">
<action method="addCrumb">
<crumbName>Home</crumbName>
<crumbInfo><label>Home</label><title>Home</title><link>/home</link></crumbInfo>
</action>
<action method="addCrumb">
<crumbName>Shopping cart</crumbName>
<crumbInfo><label>Shopping cart</label><title>Shopping cart</title></crumbInfo>
</action>
</reference>
二:
拷贝文件/app/code/core/Mage/Checkout/Block/Cart.php到/app/code/local/Mage /Checkout/Block/Cart.php,打开拷贝过来的Cart.php,添加以下代码
- public function _prepareLayout()
- {
- if ( ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs')) ) {
- $breadcrumbs->addCrumb('home', array('label'=>Mage::helper('cms')->__('Home'), 'title'=>Mage::helper('cms')->__('Go to Home Page'), 'link'=>Mage::getBaseUrl()));
- $breadcrumbs->addCrumb('cart', array('label' => 'cart', 'title' => 'cart'));
- }
- return parent::_prepareLayout();