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