0

I have my site running on Magento CE 2.0.2 version and I have breadcrumbs block code handy.

But I don't get how to call those breadcrumbs on Category and Product pages.

I tried putting the code into my theme's default.xml file like below:

<referenceContainer name="page.top">
            <block class="Magento\Theme\Block\Html\Topmenu" name="catalog.topnav" template="html/topmenu.phtml" ttl="3600"/>
            <container name="top.container" as="topContainer" label="After Page Header Top" htmlTag="div" htmlClass="top-container"/>
            <block class="Magento\Theme\Block\Html\Breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
</referenceContainer>

Any help greatly appreciated.

3

There should be code you given in default.xml

<referenceContainer name="page.top">
       <block class="Magento\Theme\Block\Html\Topmenu" name="catalog.topnav" template="html/topmenu.phtml" ttl="3600"/>
                <container name="top.container" as="topContainer" label="After Page Header Top" htmlTag="div" htmlClass="top-container"/>
                <block class="Magento\Theme\Block\Html\Breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
</referenceContainer>

You have to also check that remove tags in default.xml

<referenceBlock name="page.top" remove="true" />

Please remove this from default.xml or remove="false".

I hope this will help you.

  • I have fallowed your instruction but its not working for me – Sarvesh Tiwari Jul 19 '18 at 6:46

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.