robdecker
2/20/2014 - 5:32 PM

Drupal 7: Create custom breadcrumbs for views.

Drupal 7: Create custom breadcrumbs for views.

/**
 * Implements hook_views_pre_render().
 */
function HOOK_views_pre_render(&$view) {
  if ($view->name == 'NAME') {
    $breadcrumb = array();
    $breadcrumb[] = l(t('Home'), '<front>');
    $breadcrumb[] = l(drupal_get_title(), current_path());
    drupal_set_breadcrumb($breadcrumb);
  }
}