I want to list only parent terms in order to rearrange the orders like /admin/structure/taxonomy/vocabulary_name. Given url have displayed all terms included child terms. I want to avoid term terms. So i've tried to create custom page. I've tried below code but i can't make it work.
function test_menu() {
$items['manage_category/%taxonomy_vocabulary_machine_name'] = array(
'title' => t('Manage category'),
'page callback' => 'arep_manage_category',
'page arguments' => array(1),
'access arguments' => array('administer taxonomy'),
'type' => MENU_CALLBACK,
);
return $items;
}
function arep_manage_category() {
$category = arg(1);
module_load_include('inc', 'taxonomy', 'taxonomy.admin');
$taxonomy = taxonomy_vocabulary_machine_name_load($category);
$form = drupal_get_form('taxonomy_overview_terms', 'taxonomy_term', $taxonomy);
return drupal_render($form);
}
I've tried to access this page by vocabulary name. How ot make it work? Is any other idea?