You are here

function theme_admin_block_content in Drupal 6

Same name and namespace in other branches
  1. 5 modules/system/system.module \theme_admin_block_content()
  2. 7 modules/system/system.admin.inc \theme_admin_block_content()

This function formats the content of an administrative block.

Parameters

$content: An array containing information about the block. It should include a 'title', a 'description' and a formatted 'content'.

Related topics

5 theme calls to theme_admin_block_content()
menu_overview_page in modules/menu/menu.admin.inc
Menu callback which shows an overview page of all the custom menus and their descriptions.
system_admin_menu_block_page in modules/system/system.admin.inc
Provide a single block from the administration menu as a page.
system_logging_overview in modules/system/system.admin.inc
Menu callback; Menu page for the various logging options.
system_main_admin_page in modules/system/system.admin.inc
Menu callback; Provide the administration overview page.
system_settings_overview in modules/system/system.admin.inc
Menu callback: Displays the configuration overview page.

File

modules/system/system.admin.inc, line 1884
Admin page callbacks for the system module.

Code

function theme_admin_block_content($content) {
  if (!$content) {
    return '';
  }
  if (system_admin_compact_mode()) {
    $output = '<ul class="menu">';
    foreach ($content as $item) {
      $output .= '<li class="leaf">' . l($item['title'], $item['href'], $item['localized_options']) . '</li>';
    }
    $output .= '</ul>';
  }
  else {
    $output = '<dl class="admin-list">';
    foreach ($content as $item) {
      $output .= '<dt>' . l($item['title'], $item['href'], $item['localized_options']) . '</dt>';
      $output .= '<dd>' . $item['description'] . '</dd>';
    }
    $output .= '</dl>';
  }
  return $output;
}