2014-09-01 130 views
1

前奏Drupal 7的维护模式自定义页面不工作

  • 的Drupal 7个
  • 引导业务(活动主题)
  • 打开维护模式

操作,我已经进行了

  1. 复制维护page.tpl.php中从modules/system/maintenance-page.tpl.php
  2. 编辑您的需求
  3. 将其粘贴在主题的根文件夹 - 在/public_html/sites/default/settings.php>/public_html/sites/all/themes/bootstrap-business
  4. 设置$ CONF变量:$ 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,但我不认为这是正确的选择。

有什么建议吗?

回答

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

+0

没什么,这是难以置信的。 – Chayemor 2014-09-09 09:10:52