从magento插件更改不会产生效果,但从magento\vendor更改会显示效果

从magento插件更改不会产生效果,但从magento\vendor更改会显示效果,magento,magento2,Magento,Magento2,我对Magento非常陌生,并使用Magento 2.2.6开发插件。我需要编辑搜索栏。所以我在我的插件文件夹中添加了一个文件 Plugin\view\frontend\templates\form.mini.phtml 这不会对我的网站进行任何更改。但当我将同一个文件放入Magento\vendor\Magento\module search\view\frontend\templates\form.mini.phtml时。现在,我不想删除该供应商文件夹中的任何文件。我现在能做什么?谢谢。Bl

我对Magento非常陌生,并使用Magento 2.2.6开发插件。我需要编辑搜索栏。所以我在我的插件文件夹中添加了一个文件
Plugin\view\frontend\templates\form.mini.phtml

这不会对我的网站进行任何更改。但当我将同一个文件放入
Magento\vendor\Magento\module search\view\frontend\templates\form.mini.phtml
时。现在,我不想删除该供应商文件夹中的任何文件。我现在能做什么?谢谢。

Blockform.mini.phtmlVendor\magento\module search\view\frontend\layout\default.xml中定义


使用模块中的布局覆盖app\code\VendorName\view\frontend\layout\default.xml

编辑文件form.mini.phtml并将其放入app\code\VendorName\view\frontend\templates\form.mini.phtml


您还可以覆盖主题中的文件,而不覆盖布局文件


编辑文件form.mini.phtml并将其放入app\design\frontend\Vendor\ThemeName\Magento\u Search\templates\form.mini.phtml

您将文件放在错误的位置。也许这有助于: