-
- seldon

-
Total Posts: 92
Joined: 2007-11-08
|
Im trying to implement breadcrumbs on the accountpages. To do so, i overrode the customer/account block and added this method:
public function _prepareLayout(){
if ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs')){ $breadcrumbs->addCrumb('home', array('label'=>__('Home'), 'title'=>__('Go to Home Page'), 'link'=>Mage::getBaseUrl())); $breadcrumbs->addCrumb('account', array('label'=>'Account', 'title'=>'Account')); } }
Then i added this ‘empty’ block to the custome_account section. This block however, has no template and no real function, other then setting the breadcrumb. It is actually thus more like a helper. Therefore I wonder if this is the nicest way to implement it. Any ideas Magento team ?
Actually this is done too in the category view block. A ‘helper’ block is created to set the breadcrumbs. Is this the good way to go? Wouldnt it be nicer if this code moved to a (view) helper?
Thnx,
Seldon
|