You are here

function config_pages_set_breadcrumb in Config Pages 7

Sets the breadcrumb for administrative config_pages pages.

1 call to config_pages_set_breadcrumb()
config_pages_form_wrapper in ./config_pages.admin.inc
Form callback wrapper: create or edit a config_pages.

File

./config_pages.admin.inc, line 543
ConfigPages editing UI.

Code

function config_pages_set_breadcrumb() {
  $breadcrumb = array();

  // Generate breadcrumb item for each step of the path.
  $parts = explode('/', $_GET['q']);
  while (!empty($parts)) {
    $path = implode('/', $parts);
    $item = menu_get_item($path);
    if (!empty($item['access'])) {
      array_unshift($breadcrumb, l($item['title'], $path));
    }
    array_pop($parts);
  }

  // Add home link and theme BC.
  array_unshift($breadcrumb, l(t('Home'), '<front>'));
  drupal_set_breadcrumb($breadcrumb);
}