1

序幕

  • 德鲁巴 7
  • 引导业务(活动主题)
  • 打开维护模式

我已经执行的操作

  1. 复制maintenance-page.tpl.phpmodules/system/maintenance-page.tpl.php
  2. 根据您的需要进行编辑
  3. 将其粘贴到主题的根文件夹 -->/public_html/sites/all/themes/bootstrap-business
  4. 设置 $conf 变量/public_html/sites/default/settings.php:$conf['maintenance_theme'] = 'bootstrap_business';`

尽管如此,该网站仍继续显示modules/system/maintenance-page.tpl.php. 我不知道为什么它不起作用。我也试过:

  • 添加一个maintenance-page--offline.page.tpl.php
  • 将主题名称设置为bootstrap-business

以上都不起作用。我认为在如此简单的任务上花费 45 分钟是不够的。我知道我可以编辑modules/system/maintenance-page.tpl.php,但我不相信这是正确的方法。

有什么建议么?

4

1 回答 1

1

清除/刷新缓存(主题注册表缓存)并重试。如果您已经这样做并且没有工作,请将页面预处理功能添加到您的默认主题template.php

bootstrap_business_preprocess_maintenance_page(&$variables) {
  if (isset($variables['db_is_active']) && !$variables['db_is_active']) {
// Template suggestion for offline site
    $variables['theme_hook_suggestion'] = 'maintenance_page__offline';
  }
else {
// Template suggestion for live site (in maintenance mode)
    $variables['theme_hook_suggestion'] = 'maintenance_page';
 }
}

相关问题:https ://drupal.stackexchange.com/q/76946/12163

于 2014-09-02T20:56:02.237 回答