function template_preprocess_overlay

Implements template_preprocess_HOOK() for overlay.tpl.php

If the current page request is inside the overlay, add appropriate classes to the <body> element, and simplify the page title.

See also

overlay.tpl.php

File

drupal/core/modules/overlay/overlay.module, line 456
Displays the Drupal administration interface in an overlay.

Code

function template_preprocess_overlay(&$variables) {
  $variables['tabs'] = menu_primary_local_tasks();
  $variables['title'] = drupal_get_title();
  $variables['disable_overlay'] = overlay_disable_message();

  // Add attributes for the overlay container.
  $variables['attributes']['id'] = 'overlay';
  $variables['attributes']['class'][] = 'overlay';

  // Add attributes for the overlay title.
  $variables['title_attributes']['id'] = 'overlay-title';

  // Add attributes for the overlay content.
  $variables['content_attributes']['id'] = 'overlay-content';
  $variables['content_attributes']['class'][] = 'clearfix';
}