Default theme implementation to display a page in the overlay.

Available variables:

  • $title: the (sanitized) title of the page.
  • $page: The rendered page content.
  • $tabs (array): Tabs linking to any sub-pages beneath the current page (e.g., the view and edit tabs when displaying a node).

Helper variables:

  • $classes_array: Array of html class attribute values. It is flattened into a string within the variable $classes.

See also

template_preprocess()

template_preprocess_overlay()

template_process()

14 string references to the theme hook from overlay.tpl.php

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

hook_batch_alter in modules/system/system.api.php
Alter batch information before a batch is processed.
overlay_batch_alter in modules/overlay/overlay.module
Implements hook_batch_alter().
overlay_disable_message in modules/overlay/overlay.module
Returns a renderable array representing a message for disabling the overlay.
overlay_drupal_goto_alter in modules/overlay/overlay.module
Implements hook_drupal_goto_alter().
overlay_form_user_profile_form_alter in modules/overlay/overlay.module
Implements hook_form_FORM_ID_alter().

... See full list

File

modules/overlay/overlay.tpl.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Default theme implementation to display a page in the overlay.
  5. *
  6. * Available variables:
  7. * - $title: the (sanitized) title of the page.
  8. * - $page: The rendered page content.
  9. * - $tabs (array): Tabs linking to any sub-pages beneath the current page
  10. * (e.g., the view and edit tabs when displaying a node).
  11. *
  12. * Helper variables:
  13. * - $classes_array: Array of html class attribute values. It is flattened
  14. * into a string within the variable $classes.
  15. *
  16. * @see template_preprocess()
  17. * @see template_preprocess_overlay()
  18. * @see template_process()
  19. *
  20. * @ingroup themeable
  21. */
  22. ?>
  23. <?php print render($disable_overlay); ?>
  24. <div id="overlay" <?php print $attributes; ?>>
  25. <div id="overlay-titlebar" class="clearfix">
  26. <div id="overlay-title-wrapper" class="clearfix">
  27. <h1 id="overlay-title"<?php print $title_attributes; ?>><?php print $title; ?></h1>
  28. </div>
  29. <div id="overlay-close-wrapper">
  30. <a id="overlay-close" href="#" class="overlay-close"><span class="element-invisible"><?php print t('Close overlay'); ?></span></a>
  31. </div>
  32. <?php if ($tabs): ?><h2 class="element-invisible"><?php print t('Primary tabs'); ?></h2><ul id="overlay-tabs"><?php print render($tabs); ?></ul><?php endif; ?>
  33. </div>
  34. <div id="overlay-content"<?php print $content_attributes; ?>>
  35. <?php print $page; ?>
  36. </div>
  37. </div>

Related topics

Comments

I have enabled an overlay for non-admin users and they are seeing my default theme. So, my default theme render an overlay as a page and displays logo, primary menu which are not necessary in overlay. So, how can i change the following things:
1) change size of an overlay
2) change how my default theme is rendering contents. Basically i want to exclude logo and primary menu.

@shahgm I had the same issue, was simple to fix: users -> permissions -> make sure they have the "View the administration theme" is checked. this way it won't copy your page.tpl as an overlay.

I had the same issue as @shahgm - enabled overlay for non-admin users. The content is rendered on the overlay, but with the default theme, with all the regions (header, footer, sidebars, etc). The desired output is only the content region.

@ProudCookie 's suggestion didn't help to hide away the other regions (though it is an important config to make the overlay accessible to non-admin users).

Finally, solved it using code as given in the documentation at https://drupal.org/node/1087026.

Now, here's the question: I have a custom theme. When overlay is called for non-admin users, it prints all the regions. Before, I hit upon the JavaScript route, I changed my theme to Bartik and tested. The overlay came up just as I wanted, with only the content region. Tried checking through Bartik theme for any overlay overrides, didn't find any. I wonder.