Posted By

zachharkey on 02/04/09


Tagged

drupal theme


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

halfshadows
variantstudios
juanchifc


Drupal breadcrumb override


 / Published in: PHP
 

  1. /**
  2.  * Make breadcrumbs include the current page as an inactive crumb
  3.  * Also, remove the top level for image_galleries.
  4.  */
  5. function phptemplate_breadcrumb($breadcrumb) {
  6. if (!empty($breadcrumb)) {
  7. $breadcrumb_new = array();
  8. // Create new breadcrumb array without the top level image gallery link
  9. foreach ($breadcrumb as $crumb) {
  10. if (strstr($crumb, '<a href="/image">') != TRUE) {
  11. $breadcrumb_new[] = $crumb;
  12. }
  13. }
  14. $breadcrumb_new[] = '<span class="active">'. drupal_get_title() .'</span>';
  15. return '<div class="breadcrumb">'. implode(' ยป ', $breadcrumb_new) .'</div>';
  16. }
  17. }

Report this snippet  

You need to login to post a comment.