Same name and namespace in other branches
  1. 4.6.x developer/examples/page_example.module \page_example_help()
  2. 5.x developer/examples/page_example.module \page_example_help()

Implementation of hook_help().

Throughout Drupal, hook_help() is used to display help text at the top of pages. Some other parts of Drupal pages get explanatory text from these hooks as well. We use it here to provide a description of the module on the module administration page. This example also illustrates how to add help text to the pages your module defines.

File

developer/examples/page_example.module, line 18
This is an example outlining how a module can be used to display a custom page at a given URL.

Code

function page_example_help($section) {
  switch ($section) {
    case 'admin/modules#description':

      // This description is shown in the listing at admin/modules.
      return t('An example module showing how to define a page to be displayed to the user at a given URL.');
    case 'foo':

      // Here is some help text for a custom page.
      return t('This sentence contains all the letters in the English alphabet.');
  }
}