[prev in list] [next in list] [prev in thread] [next in thread]
List: cgiapp
Subject: HTML::Template problem
From: Stelian Iancu <stelian.iancu () gmx ! net>
Date: 2002-11-26 10:10:27
[Download RAW message or body]
Hello!
First of all, excuse me for posting this question here. But I think that
HTML::Template is strongly related to CGI::Application. So here it is. I
have these 2 templates: h2.tmpl and signup.tmpl. h2.tmpl:
<table border="0">
<tr><td><TMPL_INCLUDE NAME="menu.tmpl"></td>
<td valign="top">
<TMPL_IF NAME="FORGET">
<TMPL_INCLUDE NAME="forgot_passwd.tmpl">
<TMPL_ELSE>
<TMPL_INCLUDE NAME="signup.tmpl">
</TMPL_IF>
</td>
</tr>
</table>
In the signup.tmpl I have this option field called country and I
populate it from the database, in the script, via a <TMPL_LOOP> tag.
Here is the part:
<select name="country">
<TMPL_LOOP NAME=COUNTRY>
<option><TMPL_VAR NAME=VALUE></option>
</TMPL_LOOP>
</select>
Then, in the script, I do something like:
my $template = $self->load_tmpl('h2.tmpl');
my $signup_template = $self->load_tmpl('signup.tmpl');
$signup_template->param(COUNTRY => \@loop_data);
$template->param(FORGET => 0);
$output .= $template->output;
return $output;
So it includes the signup.tmpl but the country field is empty. If I
include directly the signup.tmpl template, it works. So I guess it has
something to do with the output of signup.tmpl. But I don't know how to
fix it. So, any ideas are appreciated.
Thanks!
--
Regards,
Stelian I.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic