문제

I am trying to remove language switcher and to do this I have added a line in:

app/design/frontend/MyPackage/MyTheme/Magento_Theme/layout/default.xml

I just add a line in <body>

<referenceBlock name="store_language" remove="true"/>

Executed deployment script, but I am still seeing Magento_Store/templates/switch/languages.phtml in profiler files list

Any idea what should do to resolve it?

도움이 되었습니까?

해결책

  1. <referenceBlock name="store_language" remove="true"/> should work, try to clean the cache :

    php bin/magento c:c && php bin/magento c:f.

  2. If it doesn't work, try to enable the template and block path hints : Stores > Configuration > Advanced > Developer > Debug and look the block name of the store switcher. if there no block, that means that the switcher has beed added in a phtml, in this case you have to do it in directly in that phtml.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top