It’s possible to add custom tabs on any page of Magento administration panel. Normally tabs are generated by Form Blocks, this is fine if you want to create standard forms but what if you need to render something totally different. Life can get very easy if we can render our custom phtml file. Embrace the high flexibility of Magento because its possible to render custom phtml in Magento admin tabs block in two simple steps.
2 steps to render custom phtml:
class NameSpace_ModuleName_Block_Adminhtml_CustomSettings_Edit_Tab_Settings extends Mage_Adminhtml_Block_Widget_Form { public function __construct() { $this->setTemplate('PATH_TO_CUSTOM_PHTML/view.phtml'); } }
Magento
Render Custom PHTML in a Magento Admin Tabs Block
It’s possible to add custom tabs on any page of Magento administration panel. Normally tabs are generated by Form Blocks, this is fine if you want to crea
· 5 min read · By Tahir Yasin
Related posts
Magento
Get Magento root category id
Learn how to retrieve the root category ID in Magento 1, understand the category hierarchy, avoid inefficient database queries, and use Magento’s built-in methods for cleaner, faster store development.
Magento
Get Magento Website Meta Data and Config Values
Following functions will help you to get Magento meta data like “Default Title”, “Default Description” To get Default Title: [code langu
Magento
Add Home link in Magento top navigation menu
Learn how to easily add a Home link to the Magento top navigation menu using simple template changes and PHP code. By default there is no Home link in Magento top navigation menu but you can easily add it yourself.