#5 <tmpl_if> is not working properly.

open
nobody
None
5
2005-11-22
2005-11-22
No

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

Discussion

  • Nobody/Anonymous

    Logged In: NO

    read the documentation for tmpl_if...

     
  • Nobody/Anonymous

    Logged In: NO

    I have just tested the above code and it works fine. Perhaps this bug has been fixed?

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks