I have another question regarding this subject. If I create a custom module how do I use the templating engine to work with the output of the module? I know this code is bad, but it summarizes what I would like to do. Any help is appreciated as I'm starting to feel dense from not being able to figure this out.
<br><br>#################################################<br>module code - mymod.php<br>#################################################<br><br>function mymod_menu($may_cache) {<br> $items = array();<br> $items[] = array('path' => 'mymod_view',
<br> 'title' => t('mymod_view'),<br> 'callback' => 'mymod_foo',<br> 'type' => MENU_LOCAL_TASK,<br> 'access' => user_access('view mymod'),<br> 'weight' => 0,
<br> );<br> return $items;<br>}<br><br>function mymod_foo() {<br> $data = array('foo' => 'bar');<br> return $data;<br>}<br><br>#################################################<br>template.php code<br>
#################################################<br><br>function phptemplate_mymod_foo() {<br> return _phptemplate_callback('mymod_foo');<br>}<br><br>
#################################################<br>mymod_foo.tpl.php<br>#################################################<br><br><h1>I want to output value of $data['foo'] here</h1><br><br><br>