magento:重写模板
我已经更改了模板文件:
app/design/adminhtml/default/default/template/sales/order/shipment/create/tracking.phtml
但是我想将此文件与这些新更改保存到新文件中并离开track.phtml 以其库存标准形式,并以某种方式将块重定向到新文件的位置并使用它。
Mage_Adminhtml_Block_Sales_Order_Shipment_Create_Tracking 是我认为我必须更改的类,我尝试在其中创建一个构造函数并使用一些不同的方法,例如 Mage::settheme 和 $this->setTemplate 但它们都没有区别。
任何帮助将非常有用
I have altered a template file in:
app/design/adminhtml/default/default/template/sales/order/shipment/create/tracking.phtml
However i'd like to save this file with these new changes into a new file and leave tracking.phtml in its stock standard form and somehow redirect the block to the location of the new file and use it instead.
Mage_Adminhtml_Block_Sales_Order_Shipment_Create_Tracking is the class I think i have to change and i've tried creating a constructor in it and using a few different methods such as Mage::settheme and $this->setTemplate but none of them make a difference.
Any help would be greatly appricated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看文件'app/design/adminhtml/default/default/layout/sales.xml',tracking.phtml被使用了几次。如果此更改针对模块,则创建一个布局文件“yourmodule.xml”并从配置文件中启用它。否则将其命名为“local.xml”。它的内容必须是这样的更新:
Look in the file 'app/design/adminhtml/default/default/layout/sales.xml', tracking.phtml is used several times. If this change is for a module then create a layout file 'yourmodule.xml' and enable it from your config file. Otherwise name it 'local.xml'. It's contents will have to be an update something like this: