我想你應該在模塊中的hook_menu中添加新的菜單路徑,它將覆蓋此路徑。應該是這樣的:
function mymodule_menu() {
$items = array();
$items['node/%node/something'] => array(
'title' => 'My title',
'page callback' => 'my_custom_callback',
'page arguments' => array(1),
'access arguments' => array('access content'),
'type' => MENU_LOCAL_TASK // use this if you want to add new tab
'type' => MENU_CALLBACK // use this if you want just callback function
);
return $items;
}
之後,你將不得不寫功能my_custom_callback
將執行代碼此頁面。
function my_custom_callback($nid = null) {
// do your code
return $output
}