Drupal: Menu Constants And Functions
In this article you will find a list of main Drupal menu constants with descriptions and code examples.
Constants
Name | Description | Code example |
MENU_CALLBACK includes/menu.inc |
Register a function by a given URL. They aren’t shown in menu |
|
MENU_DEFAULT_LOCAL_TASK
includes/menu.inc |
Every set of local tasks is a single task by default. This single task refers to the same path as its parent. |
|
MENU_LOCAL_TASK
includes/menu.inc |
Local tasks are shown as tabs by default. Use this for menu items which describes actions made on a parent item. For example, ‘node/52/edit’ path which solves an editing task (‘edit’) for ‘node/52′. |
|
MENU_MAX_DEPTH
includes/menu.inc |
The maximum depth of a menu links tree – matches the number of p columns. |
|
MENU_MAX_PARTS
includes/menu.inc |
Maxumum number of menu callback path elements. |
|
MENU_NORMAL_ITEM
includes/menu.inc |
Usual menu items which are shown in a menu tree and can be moved-hidden by admin. Use for the most menu items. This is the default value if menu item type is not specified. |
|
MENU_SUGGESTED_ITEM
includes/menu.inc |
Modules can suggest menu elements. By default, such elements are disabled and act as callbacks until admin enable them. When enabled, they become regular menu items. |
|