4

I need to work on some serious update to my D7 website. So I put my site in maintenance mode. I'm able to personalize the maintenance page by creating maintenance-page.tpl.php in my theme's template directory and it works like charm, no issues. The problem is, none of my theme css files are loaded when I'm opening the site in maintenance mode.

I'd really like to prettify the maintenance page for any visitors who visits the site in the mean time (while I'm updating). How do I do that? BTW, I'm using omega theme stable release.

  • Are you seeing the system stylesheets being loaded in the head? – Alex Gill May 1 '13 at 14:24
  • yes I can see some system stylesheets are loaded like @import url("http://sitename/modules/system/system.theme.css?mm4f6a") – pown May 1 '13 at 14:30
5

Override the maintainence stylesheet in the theme layers .info file...

  stylesheets[all][] = system.maintenance.css

To be honest if none of your theme stylesheets are loading then not sure it will work but ideally it should.

Heres some more info on theming the maintence page...

http://drupal.org/node/195435


UPDATE

Alternatively, try the following in your theme...

/**
 * Implements hook_preprocess_maintenance_page().
 */
function YOURTHEME_preprocess_maintenance_page(&$variables) {
  drupal_add_css(drupal_get_path('theme', 'YOUR_THEME') . '/css/maintenance-page.css');
}
| improve this answer | |
  • Thanks for the quick response. But still no luck. omega theme uses different format to include css, like this: ; OPTIONAL STYLESHEETS css[global.css][name] = Your custom global styles I tried that too, but still same. – pown May 1 '13 at 14:42
  • 1
    Updated answer, try that? – Alex Gill May 1 '13 at 14:48
  • Great.. the alternate option works like expected.. thanks. +1 – pown May 1 '13 at 14:53
0

You can even add direct css by following stylesheet link

<link rel="stylesheet" type="text/css" href="sites/all/themes/YOUR_THEME/css/maintaince.css">

Just remember to add full address to your theme i.e. sites/all/themes/YOUR_THEME/YOUR_CSS

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.