2014-09-01 60 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