Drupal的增加每个节点
问题描述:
自定义标题我创建了templeate HTML-landing.tpl.php,并尝试将其包括在与我的template.php enter code here
Drupal的增加每个节点
功能myfuntion_preprocess_html(& $下面的模板变量,$ hook){
$ node = menu_get_object();
如果($节点 - > NID == 60){
$variables['theme_hook_suggestions'][] = 'html-landing';
} }
的代码被调用,但所用的模板是标准html.tpl.php。
任何想法?
答
你试过用下划线代替短划线吗?
我会去这样的事情:
function myfunction_preprocess_html(&$variables, $hook) {
$node = menu_get_object();
if ($node && $node->nid == 60) {
$variables['theme_hook_suggestions'][] = 'html_landing';
}
}