久久久久久久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)
主站蜘蛛池模板: 成人免费看黄 | 中文字幕一级 | 你懂的免费在线 | 尤物在线| 日本三级线观看 视频 | 成人免费观看男女羞羞视频 | 亚洲国产欧美91 | 国产一区二区三区在线 | 亚洲一区二区三区在线观看免费 | 国产视频不卡一区 | 久色一区 | www.久草.com | 日本综合在线观看 | 欧美三级在线 | 99精品视频一区二区三区 | 网站黄色在线免费观看 | 一级片视频免费观看 | 久久天堂网 | 日韩视频免费看 | 久久精品小视频 | 欧美极品在线播放 | 伦理片97| 一区二区av | 久久免费高清 | 性色的免费视频 | 亚洲精品一区二三区不卡 | 亚洲欧美日韩在线 | 在线成人免费观看 | 成人免费一级 | 欧美日韩中文国产一区发布 | 日韩成人在线播放 | 成人精品免费视频 | 伊大人久久 | 国产精品99久久久久久久vr | 69av在线视频 | 国产ts人妖一区二区三区 | 永久看片 | 在线一区视频 | 中文字幕1区2区 | 一区二区三区日韩 | 色综久久 |