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

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

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

問(wèn)題描述

在 Magento 中,您可以從一個(gè)模塊中的另一個(gè)模塊(最常見(jiàn)的是 Magento Adminhtml 模塊)覆蓋塊(或助手,或模型等).現(xiàn)在我有一個(gè)問(wèn)題,我想覆蓋一個(gè)已經(jīng)被其他擴(kuò)展覆蓋的塊.有什么方法可以告訴 magento 忽略一些其他模塊配置中的 標(biāo)簽,類(lèi)似于布局更新中的 標(biāo)簽?

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?

這里是另一個(gè)擴(kuò)展的配置:

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>

這里是我的擴(kuò)展的配置:

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 中的塊的功能集成到我自己的塊中,現(xiàn)在我希望 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 方法可以做到這一點(diǎn),或者是注釋掉配置(這是我現(xiàn)在所做的)的唯一方法,包括以后更新該模塊時(shí)的所有麻煩?

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?

推薦答案

如果您將模塊設(shè)置為依賴于"也在進(jìn)行重寫(xiě)的模塊,那么您的配置將最后讀取并且重寫(xiě)應(yīng)該堅(jiān)持,在適當(dāng)?shù)哪鷳?yīng)該擁有的 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>

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

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

相關(guān)文檔推薦

Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 個(gè)表)
How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 設(shè)置?)
Auto populate a select box using an array in PHP(使用 PHP 中的數(shù)組自動(dòng)填充選擇框)
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 產(chǎn)生 JSON_ERROR_UTF8)
MySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名稱(chēng) ASC)
主站蜘蛛池模板: 中文字幕高清视频 | 天天爱av | 99在线精品视频 | 精品欧美一区二区三区久久久小说 | 国产高清一区二区三区 | 国产一级一片免费播放 | 国产综合久久久 | 高清国产一区二区 | 欧美精品网站 | 亚洲精品国产a久久久久久 中文字幕一区二区三区四区五区 | 男人av的天堂 | 综合久久一区 | 最新中文在线视频 | 黄色欧美大片 | 国产欧美精品一区二区色综合朱莉 | 天天干天天爱天天 | 久久精品欧美一区二区三区不卡 | 精品欧美| 精品一区二区在线观看 | 久久九九99 | 免费成人在线网站 | 91久久视频| 国产综合久久久久久鬼色 | 国产精品美女久久久久久久久久久 | 欧美精 | 91av在线免费看| 97久久精品午夜一区二区 | 国产一级片免费看 | 高清久久| 黄网站免费在线看 | 亚洲一区亚洲二区 | 国产高清在线观看 | 国产激情视频在线观看 | 日韩一区二区免费视频 | 久久久精彩视频 | 日韩综合在线 | 日韩三级一区 | 久久综合狠狠综合久久综合88 | 久久国产电影 | 欧美日韩视频在线 | 美女黄网|