2016-01-13 62 views
1

我是新上的Drupal 8另一個主題,我已經developped自定義主題,但我想用bartik主題爲核心模塊用戶,專爲登錄(但我可以接受爲所有模塊設置)。我怎樣才能做到這一點,而無需觸摸drupal核心?的Drupal 8設置登錄頁面

注: Bartik是我的地盤

提前感謝的管理主題。

回答

0

你想使用你的管理主題login.logout頁面?

使用主題negociator:https://drupal.stackexchange.com/questions/201530/how-can-i-change-the-active-theme-programmatically

這裏是一個古老的例子:https://www.drupal.org/node/2158619

爲了記錄這是舊的Drupal 7路:

/** 
* Force Admin theme for user login paths 
* @see hook_custom_theme() 
* 
* @return string 
*/ 
function ocb_home_custom_theme() { 
    $admin_theme = variable_get('admin_theme', 0); 
    if (arg(0) == 'user' && $admin_theme !==0) { 
    return $admin_theme; 
    } 
}