You are here

function crumbs_preprocess_page in Crumbs, the Breadcrumbs suite 6

Same name and namespace in other branches
  1. 6.2 crumbs.module \crumbs_preprocess_page()
  2. 7.2 crumbs.module \crumbs_preprocess_page()
  3. 7 crumbs.module \crumbs_preprocess_page()

File

./crumbs.module, line 53

Code

function crumbs_preprocess_page(&$vars) {
  $trail = crumbs_get_trail();
  $vars['crumbs_trail'] = $trail;

  // Some modules call drupal_set_breadcrumb() with their own ideas of a
  // breadcrumb, and thus overwrite the breadcrumb set in crumbs_init(),
  // Thus, we need template_preprocess_page() to restore the crumbs crumb
  // for page rendering.
  $breadcrumb = crumbs_get_breadcrumb();
  $vars['breadcrumb'] = theme('breadcrumb', $breadcrumb);
  $finder = _crumbs_get_finder();
  $finder
    ->invokePreprocessPage($vars, $trail);
}