[英]Create new report in magento
如何在magento中創建新的自定義報告? 我創建了自己的,但是他正在尋找錯誤的模板,繼續尋找aquivo的grid.php核心,如何告訴他獲取我的grid.php文件? 這可能是代碼:
<?xml version="1.0"?>
<layout version="0.1.0">
<reportneworders_adminhtml_reportneworders_index>
<adminhtml_report_statistics_index>
<reference name="content">
<block type="adminhtml/report_refresh_statistics" template="tagon/report/refresh/statistics.phtml" name="myrefreshstatistics" />
</reference>
</adminhtml_report_statistics_index>
<reference name="content">
<block type="reportneworders/adminhtml_reportneworders" name="mycontainer" template="tagon/report/grid/container.phtml">
</block>
</reference>
</reportneworders_adminhtml_reportneworders_index>
</layout>
好吧,更改不會發生,因為方法“ get Html Grid”正在動態查找由magento模板設置的設置,更改應在_prepareLayout覆蓋的方法中進行,如下所示。
protected function _prepareLayout()
{
$this->setChild( 'grid',
$this->getLayout()->createBlock( $this->_blockGroup.'/' . $this->_controller . '_grid',
$this->_controller . '.grid')->setSaveParametersInSession(true)->setTemplate('mytheme/report/grid.phtml')
);
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.