Hello all,

For long and complicated reasons, I need TT to be able to pick up on a variable specified within a variable. e.g.

In perl:

$ttvars = {
               content => $content,
               test => '[% somevariable %]',
               somevariable => 'my content'
   }

$tt->process('template.tt2', $ttvars) || die $tt->error(), "\n";


In template.tt2:

[% test %]


And for the output to result in 'my content'. Basically I want something like the INCLUDE statement that will process embedded directives, but perform this on the contents of a variable rather than a filename.

Is this possible?

Many thanks,

Karl Dane


_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to