Same name and namespace in other branches
- 4.7.x includes/theme.inc \theme_item_list()
- 5.x includes/theme.inc \theme_item_list()
- 6.x includes/theme.inc \theme_item_list()
- 7.x 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.
Return value
A string containing the list output.
Related topics
6 theme calls to theme_item_list()
- 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.
- menu_overview_tree in modules/
menu.module - Present the menu tree, rendered along with links to edit menu items.
- page_example_baz in developer/
examples/ page_example.module - A more complex page callback that takes arguments.
- theme_node_list in modules/
node.module - Format a listing of links to nodes.
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;
}