Folks,
I have a template, example
<TMPL_LOOP NAME=3D"SOME_LOOP">
<tr><td><TMPL_VAR NAME=3D"VAL1"></td></tr>
</TMPL_LOOP>
In my code I have a condition to check and see if I'm even going to =
process the loop - in this case the condition is false (loop is not =
processed)
If ($something eq 'true') {
#process some_loop
}
And the template objects:
$content =3D new HTML::Template(filename =3D> "Template1.tmpl");
$content2 =3D new HTML::Template(filename =3D> "Template1.tmpl",
associate =3D> =
$content,
);
Outputting $content is fine, no problems, it comes out as it should =
without the "some_loop" having been processed.
Output of $content2 results in the error of:
HTML::Template::param() : attempt to set parameter 'some_loop' with a =
scalar - parameter is not a TMPL_VAR!
If I print everything, like:
@param names $content{2}->query();
"SOME_LOOP" shows up in both content and content2
If I print the loop, like:
@param_names =3D $content{2}->query(loop =3D> 'SOME_LOOP');
Then in both case I get nothing (undef)..
Am I missing something?, The name of "some_loop" is unique - This seems =
very much like a problem I've had before - but I can't remember any =
fix..
Any help would be appreciated..
Thanks
-Chris |