0

I created breadcrumb using layout.xml file but when i am go to that page breadcrumb is coming at the top of the page. what i need is below the main menu.

<referenceBlock name="breadcrumbs">
            <action method="addCrumb">
                <argument name="crumbName" xsi:type="string" translate="true">Home</argument>
                <argument name="crumbInfo" xsi:type="array">
                    <item name="title" xsi:type="string" translate="true">Home</item>
                    <item name="label" xsi:type="string" translate="true">Home</item>
                    <item name="link" xsi:type="string">{{baseUrl}}</item>
                </argument>
            </action>
            <action method="addCrumb">
                <argument name="crumbName" xsi:type="string" translate="true">Contact Us</argument>
                <argument name="crumbInfo" xsi:type="array">
                    <item name="title" xsi:type="string" translate="true">Contact Us</item>
                    <item name="label" xsi:type="string" translate="true">Contact Us</item>
                </argument>
            </action>
</referenceBlock>

i created this for breadcrumb.

2
  • i.imgur.com/qwpgrJG.png in Magento by default it's always under the menu where you need to move them
    – nhungo duc
    Jun 9 at 2:43
  • try this in your layut at last <move element="breadcrumbs" destination="product.info.main" before="-"/>
    – S.P
    Jun 9 at 10:27

1 Answer 1

0

This is magento's default code for menu on top of the page. but you can try with this code it's works for me.

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

or you can remove magento default breadcrumbs and create your new custom menu like this.

<referenceContainer name="breadcrumbs" remove="true" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.