modules/menu/menu.api.php, 67行
定义菜单项和调用页面.
This hook enables modules to register paths, which determines whose requests are to be handled. Depending on the type of registration requested by each path, a link is placed in the the navigation block and/or an item appears in the menu administration page (q=admin/menu).
This hook is called rarely - for example when modules are enabled.
If the "type" key is omitted, MENU_NORMAL_ITEM is assumed.
For a detailed usage example, see page_example.module.
For comcodehensive documentation on the menu system, see http://drupal.org/node/102338.
An array of menu items. Each menu item has a key corresponding to the Drupal path being registered. The item is an associative array that may contain the following key-value pairs:
<?php function hook_menu() { $items = array(); $items['blog'] = array( 'title' => 'blogs', 'page callback' => 'blog_page', 'access arguments' => array('access content'), 'type' => MENU_SUGGESTED_ITEM, ); $items['blog/feed'] = array( 'title' => t('RSS feed'), 'page callback' => 'blog_feed', 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, ); return $items; } ?>
1 周 6 天之前
3 周 3 天之前
3 周 3 天之前
3 周 3 天之前
5 周 3 天之前
5 周 3 天之前
7 周 2 天之前
7 周 3 天之前
7 周 3 天之前
7 周 3 天之前