2013-06-18 2 views
0

당 사용자 정의 헤더를 추가하고 내 template.php enter code here은 드루팔 내가 templeate <strong>HTML-landing.tpl.php</strong>을 만든 노드

기능 myfuntion_preprocess_html (& $에 다음과 템플릿에 포함하려고 변수, $ 후크) {

$ node = menu_get_object(); 코드를 호출하지만, 사용 된 템플릿은 표준 html.tpl.php입니다 ($ 노드 -> 꾸벅 꾸벅 == 60) {

$variables['theme_hook_suggestions'][] = 'html-landing'; 

} }

경우

.

아이디어가 있으십니까?

답변

0

대시 대신 밑줄을 사용 해본 적이 있습니까?

나는 이런 식으로 뭔가 가고 싶어

: http://drupal.org/node/190815#comment-4167060

에서

function myfunction_preprocess_html(&$variables, $hook) { 
    $node = menu_get_object(); 
    if ($node && $node->nid == 60) { 
    $variables['theme_hook_suggestions'][] = 'html_landing'; 
    } 
} 

자세한 내용