久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

覆蓋多個模塊中的 magento 塊(以及如何忽略其他模

overriding a magento block in multiple modules (and how to ignore the other ones)(覆蓋多個模塊中的 magento 塊(以及如何忽略其他模塊))
本文介紹了覆蓋多個模塊中的 magento 塊(以及如何忽略其他模塊)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

在 Magento 中,您可以從一個模塊中的另一個模塊(最常見的是 Magento Adminhtml 模塊)覆蓋塊(或助手,或模型等).現在我有一個問題,我想覆蓋一個已經被其他擴展覆蓋的塊.有什么方法可以告訴 magento 忽略一些其他模塊配置中的 標簽,類似于布局更新中的 標簽?

In Magento you can override a block (or helper, or model, etc.) from one module in another one (most common from Magento Adminhtml module). Now I have the problem that I want to override a block that was already overriden by some other extension. Is there any way to tell magento to ignore the <rewrite> tag in some other module configuration similary to the <remove> tag in layout updates?

這里是另一個擴展的配置:

Here is the configuration of the other extension:

    <blocks>
        <adminhtml>
            <rewrite>
                    <catalog_product_grid>Symmetrics_DeliveryTime_Block_Adminhtml_Catalog_Product_Grid</catalog_product_grid>
            </rewrite>
        </adminhtml>
    </blocks>

這里是我的擴展的配置:

Here the configuration of my extension:

    <blocks>
        <adminhtml>
            <rewrite>
                    <catalog_product_grid>Namespace_MyModule_Block_Adminhtml_Catalog_Product_Grid</catalog_product_grid>
            </rewrite>
        </adminhtml>
    </blocks>

我將 Symmetrics_DeliveryTime 中的塊的功能集成到我自己的塊中,現在我希望 magento 忽略從該模塊覆蓋的塊.

I integrated the functionality of the block from Symmetrics_DeliveryTime into my own block and now I want magento to ignore the block overriding from that module.

是否有任何 magento 方法可以做到這一點,或者是注釋掉配置(這是我現在所做的)的唯一方法,包括以后更新該模塊時的所有麻煩?

Is there any magento way to do that or is the only way to comment out the configuration (which is what I have done for now) including all the hassle while updating that module later?

推薦答案

如果您將模塊設置為依賴于"也在進行重寫的模塊,那么您的配置將最后讀取并且重寫應該堅持,在適當的您應該擁有的 app/etc/modules 中的文件:

If you set your module to 'depend' on the one that's also doing a rewrite, your config will be read last and the rewrite should stick, in the appropriate file within app/etc/modules you should have:

<config>
  <modules>
    <Your_Module>
      <active>true</active>
      <codePool>local</codePool>
      <depends>
        <Other_Module/>
      </depends>
    </Your_Module>
  <modules>
<config>

這篇關于覆蓋多個模塊中的 magento 塊(以及如何忽略其他模塊)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 個表)
How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 設置?)
Auto populate a select box using an array in PHP(使用 PHP 中的數組自動填充選擇框)
PHP SQL SELECT where like search item with multiple words(PHP SQL SELECT where like search item with multiple words)
json_encode produce JSON_ERROR_UTF8 from MSSQL-SELECT(json_encode 從 MSSQL-SELECT 產生 JSON_ERROR_UTF8)
MySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名稱 ASC)
主站蜘蛛池模板: 中国一级特黄真人毛片免费观看 | 精品中文字幕在线观看 | 亚洲黄色成人网 | 羞羞的视频免费在线观看 | 欧美男人天堂 | 国产精品www | 亚洲精品一区二区冲田杏梨 | 国产福利资源在线 | 三级在线视频 | 欧美影院 | 久久久久国产精品免费免费搜索 | 中文字幕一区在线观看视频 | 北条麻妃av一区二区三区 | 羞羞羞视频| 国产一区二区自拍 | 日韩喷潮 | 国产欧美一区二区三区久久手机版 | 久久三区 | 日韩免费视频一区二区 | 欧美xxxx网站 | 久久精品成人 | 欧美一区二区三区免费在线观看 | 国产精品日韩欧美一区二区三区 | 五月精品视频 | 最新日韩精品 | 中文字幕在线二区 | 精品久久影院 | 日本精品裸体写真集在线观看 | 欧美日韩精品影院 | 中文字幕av免费 | 中文字幕一区二区三区精彩视频 | www成人啪啪18 | 中文字幕av在线 | 欧美成人猛片aaaaaaa | 热99视频 | 中文福利视频 | 欧美三级三级三级爽爽爽 | 国产美女一区二区 | 在线91 | 免费在线一区二区三区 | 欧日韩在线 |