Php 如何将breadcrumbs.phtml添加并应用到Magento 2中的子主题?
我有一个用于设计的Magento 2主题,还有一个我正在使用的子主题。我正在尝试修改面包屑html,以便可以扩展一些附加类。我在父主题中找不到任何breadcrumbs.phtml文件,但在vendor/magento/module-theme/view/frontend/template/html目录中找到了它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中添加它,只需将
我的问题是,如何为我的新子主题创建一个新的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