5

What would be the best practice for theming the maintenance mode page in Drupal 7?

2 Answers 2

7

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

1
  • Thanks, this worked! My fault, it added a maintenance--page.tpl.php, but obviously i didn't need the double hypen? Jul 23, 2011 at 12:55
7

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

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.