在后端的客户编辑页面中自定义选项卡

问题描述 投票:1回答:1

我需要在后端的客户编辑页面中自定义选项卡。要求是左列上的所有选项卡都应移动到主内容块,并且它们应以内联方式显示。我通过自定义customer.xml文件并为tabs块设置自定义模板来实现此目的。如何从默认的选项卡集中删除一些选项卡?为了完成同样的事情,我尝试通过块重写来覆盖_beforeToHtml()Mage_Adminhtml_Block_Customer_Edit_Tabs方法。尽管我可以使用removeTab()方法删除一些标签,但我无法删除某些标签,例如“重复的个人资料(测试版)”。删除选项卡的正确方法是什么,以及选项卡数组的确切位置。

magento tabs magento-1.7 custom-backend
1个回答
1
投票

帐单协议和重复配置文件(测试版)标签来自“app / design / adminhtml / default / default / layout / sales.xml”在此文件中,根据您的要求查找以下代码并删除标签。您也可以在xml文件中覆盖此块。如果覆盖,则使用removeTab方法。

<adminhtml_customer_edit>
    <reference name="customer_edit_tabs">
        <action method="addTab"><name>customer_edit_tab_agreements</name><block>sales/adminhtml_customer_edit_tab_agreement</block></action>
        <action method="addTab"><name>customer_edit_tab_recurring_profile</name><block>sales/adminhtml_customer_edit_tab_recurring_profile</block></action>
    </reference>
</adminhtml_customer_edit>
© www.soinside.com 2019 - 2024. All rights reserved.