Is there any way to call custom module block
in breadcrumbs
. I want to call certain html in product detail page's breadcrumbs
. I am adding following code to catalog_product_view.xml
.
companyname/module/view/template/catalog_product_view.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
...
<referenceBlock name="breadcrumbs">
<block class="Companyname\Module\Block\Product\View\test" name="product.view.test" template="Companyname_Module::product/view/test.phtml" >
</referenceBlock>
...
</body>
</page>
But this is not adding in breadcrumb.
Note: I am using custom theme.