That&#39;s what I was looking for ... Thanks!<br><br><div><span class="gmail_quote">On 4/10/07, <b class="gmail_sendername">Larry Garfield</b> &lt;<a href="mailto:larry@garfieldtech.com">larry@garfieldtech.com</a>&gt; wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>#################################################<br>module code - mymod.php<br>#################################################
<br><br>function mymod_foo() {<br>&nbsp;&nbsp;$data = array(&#39;foo&#39; =&gt; &#39;bar&#39;);<br>&nbsp;&nbsp;return theme(&#39;foo_or_something&#39;, $data);<br>}<br><br>function theme_foo_or_someting($data) {<br>&nbsp;&nbsp;return &quot;something you do with $data that generates a string&quot;;
<br>}<br><br>#################################################<br>template.php code<br>#################################################<br><br>function phptemplate_foo_or_something() {<br>&nbsp;&nbsp;return _phptemplate_callback(&#39;foo_or_something&#39;, $data);
<br>}<br><br><br>#################################################<br>foo_or_something.tpl.php<br>#################################################<br><br>&lt;h1&gt;I want to output value of $foo here&lt;/h1&gt;<br><br>(In this case $foo will have a value of &#39;bar&#39;).
<br><br>Cheers.<br><br>--Larry Garfield<br><br>On Tue, 10 Apr 2007 12:47:28 -0600, Cyberswat &lt;<a href="mailto:cyberswat@gmail.com">cyberswat@gmail.com</a>&gt; wrote:<br>&gt; I have another question regarding this subject.&nbsp;&nbsp;If I create a custom
<br>&gt; module<br>&gt; how do I use the templating engine to work with the output of the module?<br>&gt; I<br>&gt; know this code is bad, but it summarizes what I would like to do.&nbsp;&nbsp;Any<br>&gt; help<br>&gt; is appreciated as I&#39;m starting to feel dense from not being able to figure
<br>&gt; this out.<br>&gt;<br>&gt; #################################################<br>&gt; module code - mymod.php<br>&gt; #################################################<br>&gt;<br>&gt; function mymod_menu($may_cache) {
<br>&gt;&nbsp;&nbsp; $items = array();<br>&gt;&nbsp;&nbsp; $items[] = array(&#39;path&#39; =&gt; &#39;mymod_view&#39;,<br>&gt;&nbsp;&nbsp; &#39;title&#39; =&gt; t(&#39;mymod_view&#39;),<br>&gt;&nbsp;&nbsp; &#39;callback&#39; =&gt; &#39;mymod_foo&#39;,<br>&gt;&nbsp;&nbsp; &#39;type&#39; =&gt; MENU_LOCAL_TASK,
<br>&gt;&nbsp;&nbsp; &#39;access&#39; =&gt; user_access(&#39;view mymod&#39;),<br>&gt;&nbsp;&nbsp; &#39;weight&#39; =&gt; 0,<br>&gt;&nbsp;&nbsp; );<br>&gt;&nbsp;&nbsp; return $items;<br>&gt; }<br>&gt;<br>&gt; function mymod_foo() {<br>&gt;&nbsp;&nbsp; $data = array(&#39;foo&#39; =&gt; &#39;bar&#39;);
<br>&gt;&nbsp;&nbsp; return $data;<br>&gt; }<br>&gt;<br>&gt; #################################################<br>&gt; template.php code<br>&gt; #################################################<br>&gt;<br>&gt; function phptemplate_mymod_foo() {
<br>&gt;&nbsp;&nbsp; return _phptemplate_callback(&#39;mymod_foo&#39;);<br>&gt; }<br>&gt;<br>&gt; #################################################<br>&gt; mymod_foo.tpl.php<br>&gt; #################################################
<br>&gt;<br>&gt; &lt;h1&gt;I want to output value of $data[&#39;foo&#39;] here&lt;/h1&gt;<br>&gt;<br>&gt;<br><br>--<br>[ Drupal support list | <a href="http://lists.drupal.org/">http://lists.drupal.org/</a> ]<br></blockquote>
</div><br><br clear="all"><br>-- <br><br>Kevin Bridges<br><a href="http://www.kevinbridges.org/">http://www.kevinbridges.org/</a>