3
我希望我的模块覆盖的路径是由另一模块设置覆盖Drupal的路径如何从其它模块
例子:
模块A具有注册的路径:
$menu['node/%id/test'] = array(
'title' => 'Test',
'page callback' => 'test_A',
'page arguments' => array(1),
'access callback' => 'test_access',
'access arguments' => array(1),
'type' => MENU_LOCAL_TASK,
)
现在我创建模块B并注册相同的路径。
$menu['node/%id/test'] = array(
'title' => 'Test',
'page callback' => 'test_B',
'page arguments' => array(1),
'access callback' => 'test_access',
'access arguments' => array(1),
'type' => MENU_LOCAL_TASK,
)
每次要求这条道路
www.mysite.com/node/1/test
将路由到模块B未A.
什么覆盖现有路径的最佳方式是由其他模块设置的?
太棒了!非常感谢你的配偶。 – fkaufusi 2012-08-06 22:56:59