<tmpl_if> is not working properly.
Brought to you by:
samtregar
test.tmpl:
----------
<html><body>
<tmpl_if admin>
You are admin
</tmpl_if>
</body></html>
test.pl:
--------
use HTML::Template;
$tmpl = HTML::Template->new(filename => "test.tmpl");
$tmpl->param("admin" => "1");
print $tmpl->output;
Result:
-------
HTML::Template : Attempt to set nonexistent parameter
'admin' - this parameter name doesn't match any
declarations in the template file : (die_on_bad_params
=> 1) at view.pl line 38
I think it is an issue. I don't want to bo forced to
have <tmpl_var admin> in my template in order to use
<tmpl_if admin>.
Regards,
tomekM
Logged In: NO
read the documentation for tmpl_if...
Logged In: NO
I have just tested the above code and it works fine. Perhaps this bug has been fixed?