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

korgx’s picture

Status: Active » Closed (fixed)