magento:在controller中添加breadcrumbs,在 controller中:
$this->loadLayout(); $breadCrumb = $this->getLayout()->getBlock('breadcrumbs'); //这是 $breadCrumb->addCrumb('home', array( 'label' => Mage::helper('catalog')->__('Home'), 'title' => Mage::helper('catalog')->__('Go to Home Page'), 'link' => Mage::getBaseUrl(), ))->addCrumb('youhui', array( 'label' => Mage::helper('catalog')->__('youhuihuodong'), 'title' => Mage::helper('catalog')->__('youhuihuodong'), 'link' => $category->getId() ? Mage::getUrl('*/*') : NULL, )) ; (责任编辑:好模板) |