0

In my /app/design/frontend/myVendor/myTheme/Magento_Theme/layout/default.xml I have below :

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

And in my custom layout for a specefic page I need to have it. So in my

app/design/frontend/myVendor/myTheme/Magento_Theme/page_layout/myCustomPage-layout.xml

I added below:

<referenceContainer name="page.top">
        <block class="Magento\Theme\Block\Html\Breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
</referenceContainer>

But can not get the breadcrumb display.

2

1 Answer 1

0

You have to change the name of the block. So you need to change

<referenceContainer name="page.top">
    <block class="Magento\Theme\Block\Html\Breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
</referenceContainer>

to

<referenceContainer name="page.top">
    <block class="Magento\Theme\Block\Html\Breadcrumbs" name="custom_breadcrumbs" as="custom_breadcrumbs"/>
</referenceContainer>
3
  • I did not change the breadcrumbs's block name. But I tried your code and still not displaying the breadcrumbs :(
    – Zinat
    Aug 24, 2017 at 9:30
  • Have you cleared the cache after done the changes in your layout xml file? Aug 24, 2017 at 10:19
  • Yeap, I did that... wondering why it does not, as your code sounds promising...I guess I have to go with css :(
    – Zinat
    Aug 24, 2017 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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