theme_admin_block_content

Definition

theme_admin_block_content($content)
files/drupal-6.7/modules/system/system.admin.inc, line 1847

Description

This function formats the content of an administrative block.

Parameters

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

Related topics

Namesort iconDescription
Default theme implementationsFunctions and templates that present output to the user, and can be implemented by themes.
Default theme implementationsFunctions and templates that present output to the user, and can be implemented by themes.

Code

<?php
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;
}
?>