[Templates] setting META data in process()
[prev]
[thread]
[next]
[Date index for 2005/01/08]
I use [% META %] blocks to define some template metadata. Then in a
wrapper I'm using [% template.foo %] to get at that data.
I'm processing some input files that don't have the [% META %] set,
but I know the values to set when I call $template->process().
Is there a way to get the template meta data set when calling process?
Or do I need to pass in a separate "mytemplate" hash?
my $vars = {
mytemplate => {
foo => $bar,
},
};
$template->process( $page, $vars ) || die;
and then in my templates do:
[% foo = mytemplate.foo || template.foo %]
--
Bill Moseley
moseley@xxxx.xxx
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
[Templates] setting META data in process()
Bill Moseley 20:41 on 08 Jan 2005
|