LinkedIn Twitter RSS Reset

Showing Breadcrumbs Anywhere in Magento

In Magento, by default there is a reference place where breadcrumbs get showed, that is just above the content reference! But, sometimes you need to show the breadcrumbs twice! above and below the content. Or sometimes you just need to show the breadcrumbs inside the content, due to some designing issue! I’ve gone through these situation a lot, and thought why not post a solution in my blog? :D

Here’s the “magic code” for breadcrumbs to show anywhere in Magento

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

Its very simple, it just gets the block breadcrumbs defined in page.xml and echoes it as html.

Happy coding!

3 Responses to “Showing Breadcrumbs Anywhere in Magento”

  1. June 4, 2010 at 8:36 am #

    Thanks seemed to work a treat !

  2. August 15, 2011 at 2:19 am #

    It Works like a cake brother :-)

    Am using modern theme and it shoes breadcrumbs by default on the top bar in header. And this one solution bring the breadcrumbs to the content part from the header part.

    Thanks a lot for sharing.

Trackbacks/Pingbacks

  1. Romanian Music - August 31, 2011

    Romanian Music…

    Thank you for your good post,I really loved reading it….

Leave a Comment