You are here

function help_links_as_list in Drupal 5

Same name and namespace in other branches
  1. 4 modules/help.module \help_links_as_list()
  2. 6 modules/help/help.admin.inc \help_links_as_list()
  3. 7 modules/help/help.admin.inc \help_links_as_list()
1 call to help_links_as_list()
help_main in modules/help/help.module
Menu callback; prints a page listing a glossary of Drupal terminology.

File

modules/help/help.module, line 61
Manages displaying online help.

Code

function help_links_as_list() {
  $module_info = module_rebuild_cache();
  $modules = array();
  foreach (module_implements('help', TRUE) as $module) {
    if (module_invoke($module, 'help', "admin/help#{$module}")) {
      $modules[] = $module;
    }
  }
  sort($modules);

  // Output pretty four-column list
  $break = ceil(count($modules) / 4);
  $output = '<div class="clear-block"><div class="help-items"><ul>';
  foreach ($modules as $i => $module) {
    $output .= '<li>' . l($module_info[$module]->info['name'], 'admin/help/' . $module) . '</li>';
    if (($i + 1) % $break == 0) {
      $output .= '</ul></div><div class="help-items' . ($i + 1 == $break * 3 ? ' help-items-last' : '') . '"><ul>';
    }
  }
  $output .= '</ul></div></div>';
  return $output;
}