Я написал простой пример тестового модуля, 2 файла, test.module, test.info и включил их в модули drupal 7.
Я очистил весь кеш, и все же, когда я пытаюсь перейти на localhost / drupal / hello, я получаю страницу drupal 404 не найденной, почему это так?
Вот мой код:
<?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>';
}