You are here

function theme_admin_block_content in Drupal 5

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

This function formats the content of an administrative block.

@themeable

Parameters

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

3 theme calls to theme_admin_block_content()
system_admin_menu_block_page in modules/system/system.module
Provide a single block from the administration menu as a page. This function is often a destination for these blocks. For example, 'admin/content/types' needs to have a destination to be valid in the Drupal menu system, but too much…
system_main_admin_page in modules/system/system.module
Provide the administration overview page.
system_settings_overview in modules/system/system.module
Menu callback; displays a module's settings page.

File

modules/system/system.module, line 2266
Configuration system that lets administrators modify the workings of the site.

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['path'], array(
        'title' => $item['description'],
      )) . '</li>';
    }
    $output .= '</ul>';
  }
  else {
    $output = '<dl class="admin-list">';
    foreach ($content as $item) {
      $output .= '<dt>' . l($item['title'], $item['path']) . '</dt>';
      $output .= '<dd>' . $item['description'] . '</dd>';
    }
    $output .= '</dl>';
  }
  return $output;
}