You are here

function taxonomy_breadcrumb_menu in Taxonomy Breadcrumb 5

Same name and namespace in other branches
  1. 6 taxonomy_breadcrumb.module \taxonomy_breadcrumb_menu()
  2. 7 taxonomy_breadcrumb.module \taxonomy_breadcrumb_menu()

Implementation of hook_menu().

File

./taxonomy_breadcrumb.module, line 127
The taxonomy_breadcrumb module generates taxonomy based breadcrumbs on node pages and taxonomy/term pages. The breadcrumb trail takes on the form: [HOME] >> [VOCABULARY] >> TERM >> [TERM] ...

Code

function taxonomy_breadcrumb_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/settings/taxonomy-breadcrumb',
      'title' => t('Taxonomy Breadcrumb'),
      'description' => t('Configure how taxonomy based breadcrumbs are displayed.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'taxonomy_breadcrumb_admin_settings',
      ),
      'access' => user_access('administer site configuration'),
      'type' => MENU_NORMAL_ITEM,
    );

    // Similiar to core menu item in taxonomy_menu, except callback is different
    $items[] = array(
      'path' => 'taxonomy/term',
      'title' => t('Taxonomy term'),
      'callback' => 'taxonomy_breadcrumb_term_page',
      'access' => user_access('access content'),
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}