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


plazma’s picture

Hi All,

Sorry i found the answer right after writing the post

print theme('breadcrumb', drupal_get_breadcrumb());

dman’s picture

That is indeed the easiest way to do it in a theme.
FWIW, I have done something similar now in a sandbox module

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.

momentuminc’s picture

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

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.

Kendall Totten’s picture

Thank you!!!

- Kendall

nchicong’s picture

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

HydroZ’s picture

Merci, Thanks, Danke, Gracias

Anonymous’s picture

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