skip to Main Content

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

2

Answers


  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>
    
    Login or Signup to reply.
  2. One should not call a title from a breadcrumbs template as this breaks independence.

    Instead simply move breadcrumbs on top of main.content container.

    <move element="breadcrumbs" destination="main.content" before="-"/>

    You can find more info on this at Magento official documentation here : Magento 2 – Reorder recommendation units

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search