[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cgiapp] HTML::Template problem


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 => suppressed);
$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.


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.