Re: [htmltmpl] TMPL_VAR inside a TMPL_VAR
Brought to you by:
samtregar
From: Timm M. <tm...@ag...> - 2004-01-09 15:15:35
|
At 07:08 AM 1/9/04 -0800, LDT wrote: <> >my $cell_fmt = <<EOL >align="right" style="cursor:pointer;cursor:hand;" > title="Click to drill down" > onmouseover="style.background='#CCCCFF';" > onmouseout ="style.background='<TMPL_VAR > NAME=bgcolor>';"> >EOL >; > >$tmpl_main = HTML::Template->new( scalarref => \$cell_fmt ); >$tmpl_main->param( title_bar => "Rpt $rpt_no - $rpt_lbl", > hdr_asofdt => "$rpt_asofdt", > attr_fyr => $attr_fyr, > passattrs => \@loop_attr, > passdata => \@loop_data); >print $tmpl_main->output(); $tmpl_main only gets parameters that are visible inside $cell_fmt. Once those are set, you can put its output into the parameter of another template like this: my $big_tmpl = HTML::Template->new( . . . ); $big_tmpl->param( some_var => $tmpl_main->output() ); |