You are here

function _xmlsitemap_set_breadcrumb in XML sitemap 6.2

Same name and namespace in other branches
  1. 7.2 xmlsitemap.module \_xmlsitemap_set_breadcrumb()

Workaround for missing breadcrumbs on callback and action paths.

4 calls to _xmlsitemap_set_breadcrumb()
xmlsitemap_custom_delete_link_form in xmlsitemap_custom/xmlsitemap_custom.admin.inc
xmlsitemap_custom_edit_link_form in xmlsitemap_custom/xmlsitemap_custom.admin.inc
xmlsitemap_sitemap_delete_form in ./xmlsitemap.admin.inc
xmlsitemap_sitemap_edit_form in ./xmlsitemap.admin.inc

File

./xmlsitemap.module, line 1452
Main file for the xmlsitemap module.

Code

function _xmlsitemap_set_breadcrumb($path = 'admin/settings/xmlsitemap') {
  $breadcrumb = array();
  $path = explode('/', $path);
  do {
    $menu_path = implode('/', $path);
    $menu_item = menu_get_item($menu_path);
    array_unshift($breadcrumb, l($menu_item['title'], $menu_path));
  } while (array_pop($path) && !empty($path));
  array_unshift($breadcrumb, l(t('Home'), NULL));
  drupal_set_breadcrumb($breadcrumb);
}