2014-04-12 188 views
0

我正在嘗試將面板頁面模板添加到Drupal 7,但它並沒有完成。Drupal 7 - 面板頁子主題中的模板文件位置?

我已經加入這個我分專題的template.php文件:

function mytheme_preprocess_page(&$variables) { 

    // if this is a panel page, add template suggestions 
    if($panel_page = page_manager_get_current_page()) { 

    // add a generic suggestion for all panel pages 
    $variables['theme_hook_suggestions'][] = 'page__panel'; 

    // add the panel page machine name to the template suggestions 
    $variables['theme_hook_suggestions'][] = 'page__' . $panel_page['name']; 

    //add a body class for good measure 
    $body_classes[] = 'page-panel'; 
    } 
} 

然後,我已經把頁面 - panel.tpl.php在我的子主題的模板文件夾。
(完整路徑:/profiles/mytheme/themes/custom/mytheme/templates/page--panel.tpl.php)

問題是什麼?

回答

0

嘗試清除緩存(在左上方的管理菜單中使用刷新緩存)並嘗試在Appeareance部分中保存主題一次