User login

Drupal is an open source content management platform

Equipped with a powerful blend of features, Drupal supports a variety of websites ranging from personal weblogs to large community-driven websites.

Powered by Drupal, an open source content management system

Drupal menu system

admin's picture

This text is automatically translated. That's just an example how your nodes will look like.
Defines the navigation menu and page requests to convert function calls, tied to the tracks on the site.

Drupal menu system operates as a navigation system c user's perspective, and the callback system that Drupal uses to respond to the resulting URL from your browser. Therefore, a proper understanding of the menu system is the basis for the creation of complex modules.

Menu system Drupal supports a simple hierarchy defined by paths. Implementations hook_menu ( ) define the menu items and assign them to the path (which must be unique). The menu system collects these items and determines the menu hierarchy of the ways. For example, if the path identified as a, a / b, e, a / b / c / d, f / g, and a / b / h, then the menu system will form the following structure. 

Note: the number of components in ways not necessarily determine the depth of the menu item in the tree.

In response to the query page, the menu system checks whether the path that sought browser is registered as a menu item with kollbekom (function corresponding to this path). If not, then the system continues to look in the menu tree the most complete match (with kollbekom), which can be found. If the path a / b / i had been requested in the tree shown above, will be used for kollbek a / b.

Kollbek found the menu item is invoked with arguments, in the manner specified in the 'page arguments' specification of the menu item. Attributes should be placed in the array. Following these arguments, the components of the path are added additional arguments. Thus Calback a / b in the above example can give options a / b / i differently than a / b / j.

To illustrate this process, see page_example.module.

Access to the callback function is also determined by the system menu. Kollbek access ( 'access callback' with optional arguments of access ( 'access arguments' for each menu item is invoked before will be performed kollbek page. If returns TRUE then access is allowed, if FALSE then access is denied. Menu items can skip this attribute to use a value that gives the parent item.

In the default Drupal interface, you will find many links that appear as tabs. In the menu system they are called local problem (local tasks) and by default are displayed as tabs (although there is an opportunity to present them differently). Local tasks work as well as other menu items in many aspects. There is agreement that these tasks should be described as brief as possible verbs. In addition, the local task by default should be in each set. When you visit a parent menu item of local problems, local problem by default will be shown as if she was chosen. This usually requires experience with tabbed user. This task is the default special, because it indicates not the way that it represents a path that points to the parent item. The way the problem of default is only used to respectively locate it in the menu hierarchy.

Everything described above is stored in the table 'menu_router' Visible menu links are stored in the table 'menu_links' By default, they are derived from Toh same definitions across hook_menu ( ) but you can freely add more through menu_link_save ( )
 

Drupal is a free software package that allows an individual or a community of users to easily publish, manage and organize a wide variety of content on a website. Tens of thousands of people and organizations are using Drupal.

 

Poll

Do you like this theme?
Yes
48%
Nope!
7%
Where am I?
46%
Total votes: 546