4

I'm customizing rwd theme. I'm not able to show breadcrumb on product page.

In admin breadcrumb is enabled for CMS pages. Inside rwd/default/layout/page.xml

<block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>

is present. Even I tried adding

<block reference="header">
   <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>

to default handle in page.xml

Inside catalog/product/view.phtml I've tried following codes

<?php echo $this->getLayout()->getBlock('breadcrumbs')->toHtml(); ?> 

and

<?php echo $this->getChildHtml('breadcrumbs') ?>

Still it's not appearing on product page.

  • 1
    by default magento product view page has 1 column layout and breadcrumbs are called from this file.so just check 1-coloum layout file has <?php echo $this->getChildHtml('breadcrumbs') ?> if not add ther and check. – Pradeep Sanku Jun 30 '15 at 6:05
  • product view page in magento by default has breadcrumds on the detail page – Pradeep Sanku Jun 30 '15 at 6:05
5

In default rwd theme the breadcrumbs are coming on product details page.

Check at Template file:

Basically magento calls the breadcrumb in root template files 1column.phtml, 2columns-left.phtml etc. using the code <?php echo $this->getChildHtml('breadcrumbs') ?> .

Check at page.xml

And on page.xml it defines the breadcrumb block. You need to check this at thing on product details page.

Check at other layout file:

You need check any layout code that might remove the breadcrumb using below code:

<catalog_product_view>
...
<remove name="breadcrumbs" />
...
</catalog_product_view>

or

<catalog_product_view>
...
<reference name="root"> 
....               
    <action method="unsetChild"><name>breadcrumbs</name></action>
...    
</reference>
...
  • + 1 amit for answer with nice explanation – Pradeep Sanku Jun 30 '15 at 6:14
  • @Amit: I see it's present in page.xml and 1column.phtml also. When I see page source readcrumb div is loading but title and links are null. <div class="breadcrumbs"> <ul> <li class=""> <a href="" title=""></a> <span> </span> </li> <li class=""> <a href="" title=""></a> <span> </span></li> <li class=""><strong></strong> </li> </ul> </div> – amitshree Jun 30 '15 at 7:46
  • You can check it here – amitshree Jun 30 '15 at 7:52
  • so where are this two files @amitshree – vnnogile_user Aug 5 '16 at 4:56
  • @vnnogile_user: it's an old thread. I think someone has added display:none; at that time. – amitshree Aug 5 '16 at 9:44

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.