2012-12-31 2 views

답변

0

이 작동 될 수 있습니다 http://api.drupal.org/api/drupal/modules%21system%21theme.api.php/function/hook_preprocess/7

function mymodule_preprocess(&$variables, $hook) { 
    if ($hook == 'page') { 
    $variables['my_custom_page_var'] = '<div>Render in page.tpl.php</div>'; 
    } 
} 

또는 그 다음이 $my_custom_page_var로 page.tpl.php에 액세스 할 수 있어야합니다 동적 후크 이름

function mymodule_preprocess_page(&$variables) { 
    $variables['my_custom_page_var'] = '<div>Render in page.tpl.php</div>'; 
} 

를 사용합니다.

관련 문제