in reply to Re^2: IF in a loop using HTML::Template
in thread IF in a loop using HTML::Template

I don't understand your point,

Turn on debugging , and figure out where the problem is. The code you posted is not complete, I can't run it and figure it out for you.

  • Comment on Re^3: IF in a loop using HTML::Template

Replies are listed 'Best First'.
Re^4: IF in a loop using HTML::Template
by Anonymous Monk on Mar 20, 2013 at 19:49 UTC
    OK here is something that illustrate my issue:
    #!/usr/bin/perl use strict; use warnings; use HTML::Template; my $t=HTML::Template->new(filename=>'temp.tmpl'); my @foo=({bar=>1,baz=>2},{bar=>3,baz=>4}); $t->param(foo=>\@foo); my $test = 1; my $message = 'Yes there is' if $test; $t->param(TEST => $message ); print $t->output;
    and . tmpl file
    <tmpl_loop name="foo"> <tmpl_var name="bar"> <tmpl_var name="baz"> <TMPL_IF NAME="TEST"></TMPL_IF> </tmpl_loop>
    I hope someone can help!