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>&nbsp; $items = array();<br>&nbsp; $items[] = array(&#39;path&#39; =&gt; &#39;mymod_view&#39;,
<br>&nbsp; &#39;title&#39; =&gt; t(&#39;mymod_view&#39;),<br>&nbsp; &#39;callback&#39; =&gt; &#39;mymod_foo&#39;,<br>&nbsp; &#39;type&#39; =&gt; MENU_LOCAL_TASK,<br>&nbsp; &#39;access&#39; =&gt; user_access(&#39;view mymod&#39;),<br>&nbsp; &#39;weight&#39; =&gt; 0,
<br>&nbsp; );<br>&nbsp; return $items;<br>}<br><br>function mymod_foo() {<br>&nbsp; $data = array(&#39;foo&#39; =&gt; &#39;bar&#39;);<br>&nbsp; return $data;<br>}<br><br>#################################################<br>template.php code<br>
#################################################<br><br>function phptemplate_mymod_foo() {<br>&nbsp; return _phptemplate_callback(&#39;mymod_foo&#39;);<br>}<br><br>
#################################################<br>mymod_foo.tpl.php<br>#################################################<br><br>&lt;h1&gt;I want to output value of $data[&#39;foo&#39;] here&lt;/h1&gt;<br><br><br>