Last updated 24 December 2009. Created on 25 May 2009.
Edited by Jeff Burnz, SLIU. Log in to edit this page.

Because of the way Genesis preprocesses some of its variables we need to modify the default page.tpl.php to work correctly as a maintenance-page.tpl.php.

NOTE: In 6.x-2.x DEV version of Genesis includes maintenance page template files by default.

Mainly this refers to the $site_name and $logo, so to overcome this we revert back to the old fashioned way of doing things by placing the logic for these elements back into the template file.

You can copy and paste this example maintenance-page.tpl.php to your subthemes templates/page/ directory. Then follow the normal instructions for enabling your theme to take over display of the maintenance page - Theming the Drupal 6 maintenance page.

Note that in the following example I have removed many of the normal variables that print in page.tpl.php, for example there are no sidebars, header-blocks, footer, footer-message, primary or secondary links, search box and breadcrumb. There are none of the additional regions either.

// $Id$

 * @file maintenance-page.tpl.php
 * Theme implementation to display a single Drupal page while off-line.
 * @see template_preprocess()
 * @see template_preprocess_maintenance_page()
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" xml:lang="<?php print $language->language ?>" lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">
  <?php print $head; ?>
  <title><?php print $head_title; ?></title>
  <?php print $styles; ?>
  <?php print $scripts; ?>
<body id="genesis-2b">
  <div id="container" class="<?php print $body_classes; ?>">
    <div id="header" class="clear-block">

      <?php if ($logo or $site_name or $site_slogan): ?>
        <div id="branding">

          <?php if (!empty($logo)): ?>
            <a href="<?php print $base_path; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
              <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
          <?php endif; ?>
          <?php if (!empty($site_name)): ?>
            <div id="site-name"><strong>
              <a href="<?php print $base_path ?>" title="<?php print t('Home'); ?>" rel="home"><?php print $site_name; ?></a>
          <?php endif; ?>

          <?php if ($site_slogan): ?>
            <div id="site-slogan"><?php print $site_slogan; ?></div>
          <?php endif; ?>

        </div> <!-- /branding -->
      <?php endif; ?>

    </div> <!-- /header -->

    <div id="columns"><div class="columns-inner clear-block"> 
      <div id="content-column"><div class="content-inner">
        <div id="main-content">
          <?php if ($title): ?><h1 id="page-title"><?php print $title; ?></h1><?php endif; ?>
          <div id="content" class="section region">
            <?php print $content; ?>
        </div> <!-- /main-content -->
      </div></div> <!-- /content-column -->
  </div></div> <!-- /columns -->

  </div> <!-- /container -->
  <?php print $closure ?>

Looking for support? Visit the forums, or join #drupal-support in IRC.