所以我正在覆盖一个添加一些选项卡的块。我要做的就是删除几个标签。然而,即使我的代码中的 die() 杀死了所有东西(所以它被调用了),我在标签曾经所在的地方得到了一个空白点。这是代码:
配置.xml:
<global>
<blocks>
<affiliateplusext>
<class>Blizzardlabs_Affiliateplusext_Block</class>
</affiliateplusext>
<affiliateplusstatistic>
<rewrite>
<frontend_diagrams>Blizzardlabs_Affiliateplusext_Block_Frontend_Diagrams</frontend_diagrams>
</rewrite>
</affiliateplusstatistic>
</blocks>
</global>
他们的布局文件:
class Magestore_Affiliateplusstatistic_Block_Frontend_Diagrams extends Mage_Adminhtml_Block_Widget_Tabs
{
public function __construct(){
parent::__construct();
$this->setId('diagram_tab');
$this->setDestElementId('diagram_tab_content');
$this->setTemplate('affiliateplusstatistic/widget/tabshoriz.phtml');
}
protected function _prepareLayout(){
$this->addTab('sales',array(
'label' => $this->__('Sales Amount'),
'content' => $this->getLayout()->createBlock('affiliateplusstatistic/frontend_diagrams_sales')->toHtml(),
//'active' => true,
));
$this->addTab('transactions',array(
'label' => $this->__('Transactions'),
'content' => $this->getLayout()->createBlock('affiliateplusstatistic/frontend_diagrams_transactions')->toHtml(),
));
$this->addTab('commissions',array(
'label' => $this->__('Commissions'),
'content' => $this->getLayout()->createBlock('affiliateplusstatistic/frontend_diagrams_commissions')->toHtml(),
));
$this->addTab('clicks',array(
'label' => $this->__('Clicks'),
'content' => $this->getLayout()->createBlock('affiliateplusstatistic/frontend_diagrams_clicks')->toHtml(),
));
$this->addTab('impressions',array(
'label' => $this->__('Impressions'),
'content' => $this->getLayout()->createBlock('affiliateplusstatistic/frontend_diagrams_impressions')->toHtml(),
));
$this->setChild('totals',$this->getLayout()->createBlock('affiliateplusstatistic/frontend_diagrams_totals'));
$this->setChild('filters',$this->getLayout()->createBlock('affiliateplusstatistic/frontend_filters'));
return parent::_prepareLayout();
}
}
我的布局文件:
<?php
class Blizzardlabs_Affiliateplusext_Block_Frontend_Diagrams extends Magestore_Affiliateplusstatistic_Block_Frontend_Diagrams
{
protected function _prepareLayout(){
$this->addTab('sales',array(
'label' => $this->__('Sales Amount'),
'content' => $this->getLayout()->createBlock('affiliateplusstatistic/frontend_diagrams_sales')->toHtml(),
'active' => true,
));
//
// $this->addTab('transactions',array(
// 'label' => $this->__('Transactions'),
// 'content' => $this->getLayout()->createBlock('affiliateplusstatistic/frontend_diagrams_transactions')->toHtml(),
// ));
//
// $this->addTab('commissions',array(
// 'label' => $this->__('Commissions'),
// 'content' => $this->getLayout()->createBlock('affiliateplusstatistic/frontend_diagrams_commissions')->toHtml(),
// ));
//
//
//
// $this->setChild('totals',$this->getLayout()->createBlock('affiliateplusstatistic/frontend_diagrams_totals'));
// $this->setChild('filters',$this->getLayout()->createBlock('affiliateplusstatistic/frontend_filters'));
return parent::_prepareLayout();
}
}
没有错误或日志。请帮忙!