간단한 테스트 모듈 예제 인 test.module, test.info 2 개를 작성하고 drupal 7 모듈에서 사용 가능하게했습니다.Drupal 7 예제 모듈, 페이지를 찾을 수 없습니다, 이유는 무엇입니까?
모든 캐시가 지워졌고 localhost/drupal/hello로 이동하려고 할 때도 drupal 404 페이지를 찾을 수 없습니다. 이유는 무엇입니까?() 단지 일반 "콜백"옵션이 나는 hook_menu을 생각하지 않는 한 당신은 아마, 'page callback'
에 'callback'
을 변경해야합니다
<?php
function test_world_help($section) {
switch ($section) {
case 'admin/help#hello_world':
$output = '<p>Hello world help...</p>';
return $output;
case 'admin/modules#description':
return 'Hello world module description...';
}
}
function test_world_menu($may_cache) {
$items = array();
if ($may_cache) {
}
else {
$items['hello'] = array(
'title' => 'Hello world page...',
'callback' => 'test_world_page',
'access' => TRUE,
'type' => MENU_CALLBACK
);
}
return $items;
}
function test_world_page() {
return '<p>Hello world!</p>';
}
나는 혼란 스럽다. test_world_page는 무엇인가? 페이지 훅이 없습니다 http://api.drupal.org/api/drupal/includes--module.inc/group/hooks – Steven