Adding current Page title end the end of breakcrumbs

Public
</> CopyGet raw version
php
  1. function hook_breadcrumb($variables) {
  2. $breadcrumb = $variables['breadcrumb'];
  3. if (!empty($breadcrumb)) {
  4. // Adding the title of the current page to the breadcrumb.
  5. $breadcrumb[] = drupal_get_title();
  6.  
  7. $output = '' . implode('<span> › </span> ', $breadcrumb) . '';
  8. return $output;
  9. }
  10. }