Is there a way to determine (or a variable containing) if the Drupal site is in maintenance mode?
I want to theme the user-login page differently is the site is in maintenance mode.

Thanks for any help!

Comments

yuriy.babenko’s picture

if (variable_get('site_offline', 0)) {
  //site is in offline mode
}

---
Yuriy Babenko | Technical Consultant & Senior Developer
http://yuriybabenko.com

wOOge’s picture

Thanks for the quick reply!! — you sent me in the right direction, in D7 the code is:

if (variable_get('maintenance_mode', 0)) {
  //site is in offline mode
}

--
wOOge | adrianjean.ca

yuriy.babenko’s picture

Whoops - didn't realize the variable name changed between 6 & 7! Glad you got it working!

---
Yuriy Babenko | Technical Consultant & Senior Developer
http://yuriybabenko.com