function page_example_help

Same name in other branches
  1. 3.x modules/page_example/page_example.module \page_example_help()
  2. 8.x-1.x page_example/page_example.module \page_example_help()
  3. 6.x-1.x page_example/page_example.module \page_example_help()
  4. 4.0.x modules/page_example/page_example.module \page_example_help()

Implements hook_help().

Through hook_help(), a module can make documentation available to the user for the module as a whole or for specific paths. Where the help appears depends on the $path specified.

In the first example below, the help text will appear on the simple page defined in hook_menu below in the region designated for help text.

In the second example, the text will be available through the module page as a link beside the module or on the admin help page (admin/help) in the list of help topics using the name of the module. To specify help in the admin section use the module name in the path as in the second case below.

See also

hook_help()

Related topics

File

page_example/page_example.module, line 37

Code

function page_example_help($path, $arg) {
    switch ($path) {
        case 'examples/page_example/simple':
            // Help text for the simple page registered for this path.
            return t('This is help text for the simple page.');
        case 'admin/help#page_example':
            // Help text for the admin section, using the module name in the path.
            return t("This is help text created in the page example's second case.");
    }
}