The $help variable: content already wrapped

13jupiters's picture

Drupal allows modules to output 'help' messages to the page.

To display 'help', a theme usually includes a line like this somewhere in the page.tpl.php file:

<?php if ($help): ?><?php print $help ?><?php endif; ?>

The diligent themer, wishing to provide helpful visual cues for helpful help text, may be tempted to wrap this in a div of some sort. However, this isn't necessary: $help comes pre-wrapped in a div with the class attribute 'help'.

In drupal 4.x and 5.x, the relevant output is generated by the theme_help function in theme.inc:

return <div class="help"> . $help . </div>


A Sample Block

Here is a paragraph in the bottom block area.

  • a sample item
  • in an 'item-list' div
  • one of drupal's preferred
  • content wrappers
Valid XHTML 1.0 StrictValid css 2