Re: [htmltmpl] Dynamically including templates?
Brought to you by:
samtregar
From: Timm M. <tm...@ag...> - 2004-01-07 19:26:25
|
At 01:24 PM 1/7/04 -0500, Todd Chapman wrote: >I would like to pass a parameter to a template that >would be used to include another template. This >syntax does not seem to be valid: > > <TMPL_INCLUDE NAME="<TMPL_VAR NAME=include_param>"> > >How can I accomplish this? <> I use the output from one template to feed into another: ---- my $tmpl1 = HTML::Template->new( . . . ); my $tmpl2 = HTML::Template->new( . . . ); # Bunch of params() calls here $tmpl2->param( included => $tmpl1->output() ); print $tmpl1->output(); ---- With a <TMPL_VAR included> in $tmpl2's file. |