1、在对应的layout上添加一个breadcurmb的block
2、在对应module下的blcok页面的_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('person center', array('label' => $this->__('Personal Center'), 'title' => 'personal center', 'link'=>Mage::getUrl('customer/account')));
$breadcrumbs->addCrumb('my order', array('label' =>$this->__('My Order'), 'title' => 'my order'));
}
注释:lable就是你要显示的文字(首页、个人中心、我的订单等)
3、在phtml模板中获取breadcrumb
<?php echo $this->getChildHtml('breadcrumbs') ?>
实现的效果图