Magento - 在两个模块中覆盖块模板
Magento - Overriding block template in two modules
我有一个模块是这样设置订单历史块的:
<adminhtml_sales_order_view>
<reference name="order_tab_info">
<block type="adminhtml/sales_order_view_history" name="order_history" template="sales/order/view/history.phtml"></block>
</reference>
</adminhtml_sales_order_view>
但我正在编写一个新模块,我想使用不同的 history.phtml 文件。在我模块的 layout.xml 中,我写了:
<adminhtml_sales_order_view>
<reference name="order_history">
<action method="setTemplate">
<template>mymodule/sales/order/view/history.phtml</template>
</action>
</reference>
</adminhtml_sales_order_view>
但不幸的是,这对我仍然不起作用。请告知我哪里出错了?
我试图让我的模块依赖于 app/etc/modules 中的另一个模块,但这对我来说也没有解决。
我没有将我的 layout.xml 添加到我的 config.xml 中。
我有一个模块是这样设置订单历史块的:
<adminhtml_sales_order_view>
<reference name="order_tab_info">
<block type="adminhtml/sales_order_view_history" name="order_history" template="sales/order/view/history.phtml"></block>
</reference>
</adminhtml_sales_order_view>
但我正在编写一个新模块,我想使用不同的 history.phtml 文件。在我模块的 layout.xml 中,我写了:
<adminhtml_sales_order_view>
<reference name="order_history">
<action method="setTemplate">
<template>mymodule/sales/order/view/history.phtml</template>
</action>
</reference>
</adminhtml_sales_order_view>
但不幸的是,这对我仍然不起作用。请告知我哪里出错了?
我试图让我的模块依赖于 app/etc/modules 中的另一个模块,但这对我来说也没有解决。
我没有将我的 layout.xml 添加到我的 config.xml 中。