Answer the question
In order to leave comments, you need to log in
How to add a block on the module page in magento (in adminhtml)?
Hello. There is a standard module in magento.
It is necessary (without rewriting standard files) to add a block to the page. Block like this.
The custom module has already been created. Should I create a phtml template? Or it is possible to rewrite simply by means of config.xml?
Thank you.
Answer the question
In order to leave comments, you need to log in
Whether you need it or not - you decide now yourself)
Notes:
1) Magento 1.7.2.0.
2) The method, as they say, "for myself" - I would finish it in a commercial module.
3) You are familiar with magenta. If something is not clear - clarify.
Let's go:
1) If there was no layout for the admin in the module before, connect it in config.xml
2) Add to the layout:
<adminhtml_sales_order_view>
<reference name="order_tab_info">
<block type="dante_test/adminhtml_test" name="dante_test_test" template="dante/test/test.phtml" />
</reference>
</adminhtml_sales_order_view>
class Dante_Test_Block_Adminhtml_Sales_Order_View_Tab_Info extends Mage_Adminhtml_Block_Sales_Order_View_Tab_Info {
public function getTestHtml()
{
return $this->getChildHtml('dante_test_test');
}
protected function _toHtml()
{
return parent::_toHtml() . $this->getTestHtml();
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question