我想要的是更改“添加新”按钮的操作
class World_Exporter_Block_Adminhtml_Attribute extends Mage_Adminhtml_Block_Widget_Grid_Container{
public function __construct()
{
$location = str_replace('new', 'newMap', $this->getCreateUrl());
$this->_controller = 'adminhtml_attribute';
$this->_blockGroup = 'exporter';
$this->_headerText = Mage::helper('exporter')->__('Attribute Manager ');
$this->_addButtonLabel = Mage::helper('exporter')->__('Add Item');
parent::__construct();
$this->setCreateUrl($location);
$this->_addButton('add', array(
'label' => $this->getAddButtonLabel() ,
'onclick' => 'setLocation(\'' . $location .'\')',
'class' => 'add',
));
// echo $this->getCreateUrl();
}
}
经过这么多尝试后,我仍然能够将“newAction”更改为任何其他..请帮助