Closed (fixed)
Project:
Hooker
Version:
6.x-1.1
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
21 Jan 2010 at 10:04 UTC
Updated:
2 Feb 2010 at 09:21 UTC
HI, I'm newbie in drupal
I created my module which works perfect, but I don't know how to include my module variables on page of another module with which it use to work.
I found a lot of examples on this topic but I'm still confused with it. the lot of them only for experts I think :)
First of all I should create hook_them in my module file, show path to my template file()
How to write my module theme_hook?
Please can anybody help me with this explaining it step by step?
Thanks.
A bit of code what I did..
function filelanguage_theme() {
return array(
'filelanguage_output' => array(
'arguments' => array('node' => NULL, 'teaser' => FALSE, 'page' => FALSE),
'template' => 'filelanguage-output'
),
);
}
function template_preprocess_filelanguage_output(&$variables) {
$variables['temp'] = '123';
}
function filelanguage_view($temp, $node, $links = array(), $visible = TRUE) {
$output = "<h1>bla bla bla</h1>";
$output .= theme('filelanguage_output', $temp);
return $output;
}
Comments
Comment #1
korgx commented