I have a template that calls a loop:
<!--TMPL_LOOP EDITRES -->
Bunch of template HTML stuff here
<!--/TMPL_LOOP EDITRES -->
And this works fine. What I'd like to do is use a conditional in the template so that the loop is only specified when a certain parameter is present on the script side ...
<!--TMPL_UNLESS NAME="intro_error_notice" --> <!--TMPL_LOOP EDITRES --> <!--/TMPL_UNLESS -->
Bunch of template HTML stuff here
<!--TMPL_UNLESS NAME="intro_error_notice" --> <!--/TMPL_LOOP EDITRES --> <!--/TMPL_UNLESS -->
But when I try this, I get the error:
HTML::Template->new() : found <//TMPL_UNLESS> with no matching <TMPL_IF> at /path/to/template/file/here/template.tmpl : line 21. at /usr/lib/perl5/site_perl/5.6.1/HTML/Template.pm line 2117.
I have confirmed that the conditional value is being passed .. if I use:
<!--TMPL_UNLESS NAME="intro_error_notice" --> <h4><!--TMPL_VAR NAME=intro_error_notice --></h4> <!--/TMPL_UNLESS -->
The value displays. So, I guess my question is, am I asking H::T to do something it isn't able to do?
Carl Hagstrom
-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users