내가 mytheme의 template.php 넣어 코드드루팔 6 ----- 이유 테마()를 출력 할 수없는
function mytheme_theme(){
return array(
'mytheme_example' => 'example',
'argument' => array('myvar' => null),
);
}
내가 node.tpl.php 넣어 코드
<?php
$html = "";
$myvar = "hello,world";
$html .= theme('mytheme_example', myvar);
return $html;
?>
내가 example.tpl.php
<div>
here is the <b><?php print myvar; ?></b>being created.
</div>
내가 캐시를 삭제 한
하지만, 노드 기사의 페이지에 넣어 코드, 안녕하세요 세계에 대해 더 모든 출력이 없습니다.
ps : 어떤 파일에 hook_theme, template.php 모듈 파일을 사용할 수 있습니까? 이 훅을 사용할 수있는 파일이 있습니까?
나는 지적한 오류를 수정했지만 여전히 $ myvar의 값을 출력 할 수 없습니다. – runeveryday
연관 배열을 반영하도록 솔루션을 업데이트했습니다. 문제가 있다고 생각하므로 – wiifm