how to theme maintenance page?
noovot - February 16, 2008 - 15:02
Hi.
I just started making my theme, and i want to stylize maintenance page. I found some solutions by searching but it seems that they fit for 5.x. As i'm dealing with 6.x they don't for for me. Because as i understand something in theming maintenance page has changed. Can anybody enlighten me? I want to override theming of maintenance page in my theme (tempalte), i don't want to hack core. Thanks

=-=
add a custom maintenance-page.tpl.php to your theme
see the one in garland for example
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
okay, i just copied it,
okay, i just copied it, because it seems to not have any garland tails
nothing happened
i tried to loook through garland's template.php - there's nothing that looks like maintenance (override or kinda)
i feel it's somewhere in includes/themes.maintenance.inc but where...?
This might be the
This might be the issue:
http://drupal.org/node/132442#theme-registry
The registry doesn't factor
The registry doesn't factor into maintenance pages but that is the only exception.
⎋ joon park
Get that
Get that maintenance-page.tpl.php into your theme then look inside your "settings.php" file. There will be notes on maintenance themes.
The way the new theming system is handled, makes this necessary. A nice bonus though is that if your database crashes, you can also add "maintenance-page-offline.tpl.php" to show a friendly page with your branding intact.
⎋ joon park
Doesn't work for online maintenance mode
That does work well if the mysql DB is offline, but maintenance-page.tpl.php isn't parsed when the DB is online and the site mode is offline--page.tpl.php is called instead.
You have to log-out. It's
You have to log-out. It's only supposed to be visible for anonymous users.
http://drupal.org/node/195435
⎋ joon park
Any way to override that?
Any way to override that?
To be more clear.. Users
To be more clear.. Users without administration privileges will see the offline page. Administrators seeing that screen would lock them out forever.
⎋ joon park
–the devil in the details–
doesnt work for me either
Does not work for me, followed the instructions in the docs .. seems simple enough. That hack below is looking very tempting!
Nevermind that
I forgot to uncomment the closing line of the $conf thingy. Oops ^_^
also I got tripped up by not including both
maintenance-page-offline.tpl.php
maintenance-page.tpl.php
Now I just need to find the hook to call the off-line message set in the admin, and this will be perfect!
make some changes
change in the includes\theme.maintenance.inc (line 46):
$theme = variable_get('maintenance_theme', 'minnelli');to
$theme = variable_get('maintenance_theme', 'YOUR_THEME');do not forget to put your changed maintenance-page.tpl.php file in the root folder of your theme
=-=
you shouldn't hack core files, it's not a best practice. Using the settings.php method insures that when your site is updated the changes are left intact. The method above means, you will have to make this same change multiple times.
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
make some change - just Curious
Hi, reading this Post i had somehow a clue.
Can you not add to your custom maintenance-page.tpl.php an
"if"statement that when the"variable_get('maintenance_theme' == "minnelli",change to"Your_Theme"?I'm really unknown of PHP it's really only a pure ultra-beginners curiosity.
I just thing that might be the logical sequence to not fork or hack Drupal-Core for obviously
future update-processing.
Cheers
P.S.
JUst deleted my link to a homepage that do not exist anymore. (15.06.2008)
For the love of god.... I
For the love of god.... I cant get this to work after I upgraded... Working with theme "marvin".
I copied the template.tpl.php to chameleon directory
then I change settings. I have tried both (line 185)
$conf = 'maintenance_theme' => 'marvin',and
$conf = ['maintenance_theme'] => 'marvin',and
'maintenance_theme' => 'marvin',None if this worked so I went to theme.maintance.inc and changed on line 46
$theme = variable_get('maintenance_theme', 'marvin');whatever I do, when site is off line the viewer gets:
PLS: Any help would be much appreciated.
Regards
changing maintenance page
Hi, i figured out a nifty way to change my maintenance page without messing with any configuration whatsoever. Go into the Garland theme folder in your drupal installation, copy the maintanance-page.tpl.php to your computer and edit the heck out of it. Then, rename the garland's original one as something else, like maintenance-page.tpl-old.php, and upload your new one in its place. it will automatically take it up and i pretty much took a html page which i'm using as the "coming soon" page for a client.
Hope this way works out for you, and let me know if you have any questions; oh by the way i'm in drupal 6.3.
Jesus fraken bush, you would
Jesus fraken bush, you would think the drupal team could have made this any more difficult :)