How can I move breadcrumb before main title on Magento 2

守給你的承諾、 提交于 2020-02-06 09:27:07

问题


I would like please your help. I am newbie on Magento 2 and still searching things. I would like to move breadcrumb before title (on category pages, product everywhere). I tried to change it on default.xml <move element="page.main.title" destination="page.top" after="breadcrumbs"/>

but with no luck.

Also i tried to do it from catalog_category_view.xml on vendor/magento/module-catalog/view/frontend/layout but no luck. Can anyone please guide me where can I find the order that is loading?

Can you please help? Thank you in advance


回答1:


Try this,

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="page.main.title" destination="breadcrumbs" before="-" />
    </body>
</page>


来源:https://stackoverflow.com/questions/59071117/how-can-i-move-breadcrumb-before-main-title-on-magento-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!