如何使用佈局xml文件刪除一個已經存在的塊刪除塊?具體而言,我想從名爲「top.switches」的塊中刪除名爲「currency」的塊。它被插入在directory.xml文件,這樣的:Magento的 - 用更新XML
<default>
<reference name="top.switches">
<block type="directory/currency" name="currency" before="store_language" template="directory/currency.phtml"/>
</reference>
<reference name="head">
<block type="core/template" name="optional_zip_countries" as="optional_zip_countries" template="directory/js/optional_zip_countries.phtml" />
</reference>
</default>
我不認爲這個工程在Magento 2.0了 – CarComp
@CarComp Magento的1和2有完全不同的平臺非常不同的方法來佈局XML,所以你會是正確的。 – Navarr
@CarComp你會很驚訝於如此相像M1和M2有關remove元素:http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/xml-instructions.html –