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()

File

modules/overlay/overlay.tpl.php
View source
<?php

/**
 * @file
 * 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 template_preprocess()
 * @see template_preprocess_overlay()
 * @see template_process()
 *
 * @ingroup themeable
 */
?>

<?php

print render($disable_overlay);
?>
<div id="overlay" <?php

print $attributes;
?>>
  <div id="overlay-titlebar" class="clearfix">
    <div id="overlay-title-wrapper" class="clearfix">
      <h1 id="overlay-title"<?php

print $title_attributes;
?>><?php

print $title;
?></h1>
    </div>
    <div id="overlay-close-wrapper">
      <a id="overlay-close" href="#" class="overlay-close"><span class="element-invisible"><?php

print t('Close overlay');
?></span></a>
    </div>
    <?php

if ($tabs) {
  ?><h2 class="element-invisible"><?php

  print t('Primary tabs');
  ?></h2><ul id="overlay-tabs"><?php

  print render($tabs);
  ?></ul><?php

}
?>
  </div>
  <div id="overlay-content"<?php

print $content_attributes;
?>>
    <?php

print $page;
?>
  </div>
</div>

Related topics

Comments

shahgm’s picture

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.

ProudCookie’s picture

@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.

sri20198’s picture

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.

miliwebdeveloper27’s picture

Hi sri20198,

Drupal version drupal 7

I wanted to use overlay in my custom form where I can call drupal user login form on button click. I tried jquery and javascript but not get through yet. It will be great if you help.

Thank you in advance.