Drupal menu system

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 Search Interface

This text is automatically translated. That's just an example how your nodes will look like.

Modules can be included in a search of different types of data. Most of the work in a retrieval system performs search.module so he should be allowed for all functions in the search.

There are three ways to interact with the system to search: To search specifically nodah realized nodeapi ( 'update index' ) and nodeapi ( 'search result' ) However, please note that the search engine has indexed all visible output nodes - everything that is displayed by hook_view ( ) and hook_nodeapi ( 'view' ) Usually enough. This mechanism should be used only if the need to index additional hidden data.

Implementation hook_update_index ( ) This will be used in the module drupalovsky HTML indexing mechanism for efficient full-text search.

If the module should provide a more comprehensive search capability, you need to implement their own without hook_search ( ) In this case, you need to define it as a local task (tab) page / search (eg, / search / mymodule so that users could easily find it.