As I mentioned in an earlier post, I have both Class::DBI and TT working
individually just fine. The problem I have now is getting the results of
a Class::DBI retrieve_all method call into my TT template variables.
I have in my script:
my @volumes = S::Volumes->retrieve_all;
my $vars = {'volumes' => @volumes};
...
$tt->process($template,$vars) || die Template->error;
__END__
In my template:
[% FOREACH item IN volumes %]
* [% item %]
[% END %]
I guess I'm really unclear on what retrieve_all returns and what to give
to $tt->process() as the second param.
Any insight would be greatly appreciated. Also, how might I mix the
results of a retrieve_all and a simple retrieve($id) into the same
template (or the same $var to pass to process() I guess).
-Will
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates