theme_item_list

5 theme.inc theme_item_list($items = array(), $title = NULL, $type = 'ul', $attributes = NULL)
6 theme.inc theme_item_list($items = array(), $title = NULL, $type = 'ul', $attributes = NULL)
7 theme.inc theme_item_list($variables)
8 theme.inc theme_item_list($variables)

Return a themed list of items.

Parameters

$items: An array of items to be displayed in the list.

$title: The title of the list.

Return value

A string containing the list output.

Related topics

9 theme calls to theme_item_list()

File

includes/theme.inc, line 772
The theme system, which controls the output of Drupal.

Code

function theme_item_list($items = array(), $title = NULL) {
  $output = '<div class="item-list">';
  if (isset($title)) {
    $output .= '<h3>' . $title . '</h3>';
  }

  if (isset($items)) {
    $output .= '<ul>';
    foreach ($items as $item) {
      $output .= '<li>' . $item . '</li>';
    }
    $output .= '</ul>';
  }
  $output .= '</div>';
  return $output;
}
Login or register to post comments