You are here

function theme_item_list in Drupal 4

Same name and namespace in other branches
  1. 5 includes/theme.inc \theme_item_list()
  2. 6 includes/theme.inc \theme_item_list()
  3. 7 includes/theme.inc \theme_item_list()

Return a themed list of items.

Parameters

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

$title: The title of the list.

$type: The type of list to return (e.g. "ul", "ol")

Return value

A string containing the list output.

Related topics

10 theme calls to theme_item_list()
aggregator_block in modules/aggregator.module
Implementation of hook_block().
aggregator_page_categories in modules/aggregator.module
Menu callback; displays all the categories used by the aggregator.
aggregator_page_sources in modules/aggregator.module
Menu callback; displays all the feeds used by the aggregator.
book_render in modules/book.module
Menu callback; prints a listing of all books.
menu_overview_tree in modules/menu.module
Present the menu tree, rendered along with links to edit menu items.

... See full list

File

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

Code

function theme_item_list($items = array(), $title = NULL, $type = 'ul') {
  $output = '<div class="item-list">';
  if (isset($title)) {
    $output .= '<h3>' . $title . '</h3>';
  }
  if (!empty($items)) {
    $output .= "<{$type}>";
    foreach ($items as $item) {
      $output .= '<li>' . $item . '</li>';
    }
    $output .= "</{$type}>";
  }
  $output .= '</div>';
  return $output;
}