Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By plazma on
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
found it
Hi All,
Sorry i found the answer right after writing the post
print theme('breadcrumb', drupal_get_breadcrumb());
module
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.
.dan. is the New Zealand Drupal Developer working on Government Web Standards
In case anyone is interested
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.
Thank you!!!
Thank you!!!
- Kendall Totten
Thank you. This 1 line of
Thank you. This 1 line of code just saves my day.
Merci
Merci, Thanks, Danke, Gracias
It is print on the top of the
It is print on the top of the page not in custom block.