Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/297.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何将breadcrumbs.phtml添加并应用到Magento 2中的子主题?_Php_Xml_Magento - Fatal编程技术网

Php 如何将breadcrumbs.phtml添加并应用到Magento 2中的子主题?

Php 如何将breadcrumbs.phtml添加并应用到Magento 2中的子主题?,php,xml,magento,Php,Xml,Magento,我有一个用于设计的Magento 2主题,还有一个我正在使用的子主题。我正在尝试修改面包屑html,以便可以扩展一些附加类。我在父主题中找不到任何breadcrumbs.phtml文件,但在vendor/magento/module-theme/view/frontend/template/html目录中找到了它 我的问题是,如何为我的新子主题创建一个新的breadcrumbs.phtml文件,以及在哪里将其添加到xml中,以便在前端反映出来?如果您只想覆盖模板,则不需要在xml中添加它,只需将

我有一个用于设计的Magento 2主题,还有一个我正在使用的子主题。我正在尝试修改面包屑html,以便可以扩展一些附加类。我在父主题中找不到任何breadcrumbs.phtml文件,但在vendor/magento/module-theme/view/frontend/template/html目录中找到了它


我的问题是,如何为我的新子主题创建一个新的breadcrumbs.phtml文件,以及在哪里将其添加到xml中,以便在前端反映出来?

如果您只想覆盖模板,则不需要在xml中添加它,只需将
breadcrumb.phtml
文件复制到主题的目录中,就可以在主题中修改它

您可以将
breadcrumb.phtml
文件放在下面的路径中

app\design\frontend\\\Magento\u Theme\templates\html\


值得注意的是,产品页面上使用了不同的PHTML文件:

/vendor/magento/module catalog/view/frontend/templates/product/breadcrumbs.phtml