in reply to Dynamic TMPL_INCLUDE in HTML::Template
Then in your code:<tmpl_include magic>
By replacing the special <tmpl_include> with a real one using a generate template name you will achieve a dynamic template include.my $filename = "magic_include.tmpl"; my $filter = sub {$$_[0] =~ s/<tmpl_include magic>/<tmpl_include $f +ilename>/}; my $t = HTML::Template->new(filename => "magic.tmpl", filter => $filter);
I really should put this in the FAQ!
-sam
|
|---|