function taxonomy_edge_menu in Taxonomy Edge 8
Same name and namespace in other branches
- 6 taxonomy_edge.module \taxonomy_edge_menu()
- 7.2 taxonomy_edge.module \taxonomy_edge_menu()
- 7 taxonomy_edge.module \taxonomy_edge_menu()
Implements hook_menu().
File
- ./
taxonomy_edge.module, line 83 - Selecting all children of a given taxonomy term can be a pain. This module makes it easier to do this, by maintaining a complete list of edges for each term using the adjecency matrix graph theory.
Code
function taxonomy_edge_menu() {
$items = array();
// Bring /level and /all back into taxonomy pages and feeds
$items['taxonomy/term/%taxonomy_term'] = array(
'title' => 'Taxonomy term',
'title callback' => 'taxonomy_term_title',
'title arguments' => array(
2,
),
'page callback' => 'taxonomy_edge_term_page',
'page arguments' => array(
2,
3,
),
'access arguments' => array(
'access content',
),
'file' => 'taxonomy_edge.pages.inc',
);
$items['taxonomy/term/%taxonomy_term/%/feed'] = array(
'title' => 'Taxonomy term',
'title callback' => 'taxonomy_term_title',
'title arguments' => array(
2,
),
'page callback' => 'taxonomy_edge_term_feed',
'page arguments' => array(
2,
3,
),
'access arguments' => array(
'access content',
),
'file' => 'taxonomy_edge.pages.inc',
);
// settings page
$items['admin/structure/taxonomy/edge'] = array(
'title' => 'Edge',
'description' => 'Administer taxonomy edges',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'taxonomy_edge_settings_form',
),
'access arguments' => array(
'administer taxonomy edge',
),
'type' => MENU_LOCAL_TASK,
'file' => 'taxonomy_edge.admin.inc',
);
$items['admin/structure/taxonomy/rebuild/%/%'] = array(
'title' => 'Rebuild edges',
'description' => 'Rebuild taxonomy edges',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'taxonomy_edge_rebuild_page_confirm',
4,
5,
),
'access arguments' => array(
'administer taxonomy edge',
),
'type' => MENU_CALLBACK,
'file' => 'taxonomy_edge.admin.inc',
);
return $items;
}