That'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> <<a href="mailto:larry@garfieldtech.com">larry@garfieldtech.com</a>> 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> $data = array('foo' => 'bar');<br> return theme('foo_or_something', $data);<br>}<br><br>function theme_foo_or_someting($data) {<br> return "something you do with $data that generates a string";
<br>}<br><br>#################################################<br>template.php code<br>#################################################<br><br>function phptemplate_foo_or_something() {<br> return _phptemplate_callback('foo_or_something', $data);
<br>}<br><br><br>#################################################<br>foo_or_something.tpl.php<br>#################################################<br><br><h1>I want to output value of $foo here</h1><br><br>(In this case $foo will have a value of 'bar').
<br><br>Cheers.<br><br>--Larry Garfield<br><br>On Tue, 10 Apr 2007 12:47:28 -0600, Cyberswat <<a href="mailto:cyberswat@gmail.com">cyberswat@gmail.com</a>> wrote:<br>> I have another question regarding this subject. If I create a custom
<br>> module<br>> how do I use the templating engine to work with the output of the module?<br>> I<br>> know this code is bad, but it summarizes what I would like to do. Any<br>> help<br>> is appreciated as I'm starting to feel dense from not being able to figure
<br>> 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><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>