0
drupal 6.我有這個hook_menu()。如何在drupal中調用模塊中的不同函數6
$items['graph'] = array(
'title' => t('Sample Graphs'),
'page callback' => 'graph_content',
'type' => MENU_CALLBACK,
'access arguments' => array('access content'),
);
$items['graph/line_graph'] = array(
'title' => t('Line Graph'),
'page callback' => 'line_graph_content',
'type' => MENU_CALLBACK ,
'access arguments' => array('access_content'),
);
我想轉到其他頁面的折線圖。當我去'?q = graph'時,它會調用graph_content函數。它正在工作,但是當我去'?q = graph/line_graph'時,同樣的函數會調用它。 'graph'和'line_graph'的輸出是相同的。他們在同一個模塊中誰能幫我解決這個問題?謝謝!!
您需要使用hook_menu_alter –