function bartik_preprocess_maintenance_page

Same name in other branches
  1. 7.x themes/bartik/template.php \bartik_preprocess_maintenance_page()
  2. 8.9.x core/themes/bartik/bartik.theme \bartik_preprocess_maintenance_page()

Implements hook_preprocess_HOOK() for maintenance-page.html.twig.

File

core/themes/bartik/bartik.theme, line 66

Code

function bartik_preprocess_maintenance_page(&$variables) {
    // By default, site_name is set to Drupal if no db connection is available
    // or during site installation. Setting site_name to an empty string makes
    // the site and update pages look cleaner.
    // @see template_preprocess_maintenance_page
    if (!$variables['db_is_active']) {
        $variables['site_name'] = '';
    }
    // Bartik has custom styling for the maintenance page.
    $variables['#attached']['library'][] = 'bartik/maintenance_page';
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.