Hi All,

Ive been looking around but cant find an answer, for some reason i cannot access the breadcrumb variable in a block, is this by design or is there another way to access it in a block

Cheers all

Comments

Hi All,

Sorry i found the answer right after writing the post

<?php
print  theme('breadcrumb', drupal_get_breadcrumb());
?>

That is indeed the easiest way to do it in a theme.
FWIW, I have done something similar now in a sandbox module
http://drupalcode.org/viewvc/drupal/contributions/sandbox/dman/breadcrum...

You can get it by going
cvs co -d :pserver:anonymous@cvs.drupal.org:/cvs/drupal-contrib -d breadcrumb_block contributions/sandbox/dman/breadcrumb_block

... not sure if it's worth a stand-alone project yet. Maybe.

In case anyone is interested in doing this in Drupal 7, you can use:

<?php
print  theme('breadcrumb', array('breadcrumb'=>drupal_get_breadcrumb()));
?>

Took me a few minutes to figure it out and I didn't see it in any of the posts on the subject, so thought I'd share.

Thank you!!!

Thank you. This 1 line of code just saves my day.

Merci, Thanks, Danke, Gracias

It is print on the top of the page not in custom block.