This module integrates into the Help module (using the hook_help() hook) to add help messages based on the URL and/or by user role. There is an administration form that allows users to set the messages and where they appear on the site. Multiple help messages can be added to the same page at once, the administration form can be ordered to sort the order that these messages appear.
In order to make the help messages appear you need to make sure that the $messages variable is printed on your template layer. Most themes will do this.
View the Custom Help Text Project Page on Drupal.org.
Custom Help Text installs just like any other Drupal module. Place the module folder into your modules folder of your Drupal install and enable it. A table called hook_help is created to store the help items.
Using the Custom Help Text module
The Custom Help Text module allows site administrators to hook into the Drupal help system and add help messages to the top of any page. The messages are displayed based on the path of the page, so in order to display a message on the Drupal dashboard page you would use the path "admin". The Custom Help Text module is also able to understand path wildcards.
To Access the Custom Help Text administration page go to the path admin/build/hook_help/admin or go to Site building > Custom Help Text. The admin page consists of a list of the paths that have been set, along with a snippet of the help text.
Creating a help item
To create a help item click on the Add help item menu item, this will take you to a page with a text box and a text area.
The Path is the path to the page you want the help text to appear on and the Help message is the text that you would like to appear there. The path should be entered without the leading slash, but if you do enter it then the module will remove it before saving. Once a help item is saved the module will take you back to the Custom Help Text admin page and show the help item you just created.
As an example, lets say you wanted to add some text to the top of the Page node creation form. To do this you would use the path node/add/page. Any text you add here will be printed in the help section at the top of the page when you go to create a new Page node.
Editing a help item
To edit an existing help item click on the edit link in the Actions area of the help item (on the right). This will take you to a form that will allow you to change and update the help item.
Deleting a help item
To edit an existing help item click on the delete link in the Actions area of the help item (on the right). This will take you to a confirmation page where you can confirm the help item deletion or cancel. Clicking confirm on this page will delete the help item entirely.
It is possible to set two (or more) help messages for the same page either by setting the paths directly, or by setting paths with wildcards that overlap. When this happens the ordering of the help items is important otherwise the help messages would come out in the order they were created in. Notice that the help admin page form consists of a element ordering form, also known as a Drupal tabledrag element. By dragging the items up and down the list (and then clicking save changes) the order that the help items are printed can be changed.
It is possible to use a wildcard to allow help messages to appear on more than one page. The wildcard character is a star (*) and can be used in place of any word or part of the path to alter the pages that will display that help message. Here are some examples of paths and where the help messages will be displayed on the site.
- * = Every page on the site.
- admin/* = Every page under the admin page, but not the admin page itself.
- admin* = The admin page and every page underneath it.
- node/add/* = Any node creation page.
- node/*/edit = Any node edit page.
- user/* = Any user page
- admin/content/* = The comment admin and the content list page.
- node/* = Any node view page (even if the URL has been changed by the Path module).
The Custom Help Text admin page allows for both the order of the messages and the paths to be changed quickly. To change a path for a help item change its value in the text box on the Custom Help Text admin page and save it.