function theme_admin_page

7.x system.admin.inc theme_admin_page($variables)
6.x system.admin.inc theme_admin_page($blocks)

Returns HTML for an administrative page.

Parameters

$variables: An associative array containing:

  • blocks: An array of blocks to display. Each array should include a 'title', a 'description', a formatted 'content' and a 'position' which will control which container it will be in. This is usually 'left' or 'right'.

Related topics

1 theme call to theme_admin_page()
system_admin_config_page in drupal-7.x/modules/system/system.admin.inc
Menu callback; Provide the administration overview page.

File

drupal-7.x/modules/system/system.admin.inc, line 2463
Admin page callbacks for the system module.

Code

function theme_admin_page($variables) {
  $blocks = $variables['blocks'];

  $stripe = 0;
  $container = array();

  foreach ($blocks as $block) {
    if ($block_output = theme('admin_block', array('block' => $block))) {
      if (empty($block['position'])) {
        // perform automatic striping.
        $block['position'] = ++$stripe % 2 ? 'left' : 'right';
      }
      if (!isset($container[$block['position']])) {
        $container[$block['position']] = '';
      }
      $container[$block['position']] .= $block_output;
    }
  }

  $output = '<div class="admin clearfix">';
  $output .= theme('system_compact_link');

  foreach ($container as $id => $data) {
    $output .= '<div class="' . $id . ' clearfix">';
    $output .= $data;
    $output .= '</div>';
  }
  $output .= '</div>';
  return $output;
}