Hopefully a simple question, though searching does not yield an answer ... Is it possible to theme the "site off-line" page of drupal?

Thanks.

Comments

Dixen’s picture

In order to theme the site maintenance page it requires a hack of core file 'includes/them.inc' (lines 429-456). Course, that's not the best option... but it is avail.

cwalkabout’s picture

See this comment in another thread: http://drupal.org/node/58562#comment-266358

In summary:
- copy theme_maintenance_page() from includes/theme.inc to themes/yourtheme/template.php, and then rename it to phptemplate_maintenance_page()
- copy misc/maintenance.css to themes/yourtheme/maintenance.css
- change phptemplate_maintenance_page() to load the css file from your themes dir, instead of from misc.
- edit either file as required

If you only want to change the background image as I did, rather than copying maintenance.css, you could create a new CSS file in your themes directory instead (e.g. "maint_override.css").
- add this line to that file (assuming you have a logo.png in your themes directory):

body {
  background: url(logo.png) 4.2em 4em no-repeat #fff;
}

- then add this line to phptemplate_maintenance_page() after the line which loads misc/maintenance.css:

drupal_set_html_head('<style type="text/css" media="all">@import "'. base_path() .'themes/yourtheme/maint_override.css";</style>');