What would be the best practice for theming the maintenance mode page in Drupal 7?
2 Answers
You can edit or create a "maintenance-page.tpl.php" file in your theme directory and edit that to theme your maintenance page.
You can view the source on the Drupal API page
-
Thanks, this worked! My fault, it added a maintenance--page.tpl.php, but obviously i didn't need the double hypen? Commented Jul 23, 2011 at 12:55
In drupal 7
The system include a default template that is located here: /modules/system/maintenance-page.tpl.php Now you can copy this file into your theme templates directory and modify maintenance.tpl.php or rewrite that file in your way. Than you must modify your settings.php file to instruct the system to display your template. You can enabling the $conf variable and adding the internal name of your theme:
$conf['maintenance_theme'] = 'themename';
When database failure there is a particular template avaible: maintenance-page--offline.tpl.php