A
andy
I have a html file named test.tmpl and containing the below lines.
=====================================================================
<html>
<head>
<title>Song Listing</title>
</head>
<body>
<h1>My Songs</h1>
<tr>
<td valign="top">
<table width="150%" border="1" cellpadding="3"
cellspacing="1">
<tr height="20" style="font-size: 95%;"><td> </td></tr>
<tr height="20" style="font-size: 95%;"><td align="left"
valign="middle"><a href="TMPL_VAR NAME=SOME_DATA">NITIN</a></td></tr>
</table>
</td>
<table>
</BODY>
</HTML>
=====================================================================
I have a cgi script as below to open this tmpl file from the web
browser.
The cgi script is mentioned as below.
======================================================================
#!/usr/bin/perl -w
use strict;
use lib "site/lib/perl5/5.8.5/";
use lib "site/lib/perl5/5.8.5/i386-linux-thread-multi/";
use lib "site/lib/perl5/site_perl/5.8.5/";
use lib "site/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/";
use CGI:retty qw/:standard/;
use CGI;
use CGI::Session;
use HTML::Template;
my $site = "http://www.google.co.in";
my $cgi = new CGI;
print $cgi->header();
my $template = HTML::Template->new(filename => "//usr//local//apache2/
templates//test.tmpl");
$template->param(SOME_DATA=> $site);
print $template->output;
1;
======================================================================
My requirement is to link some other page like http://www.google.co.in
to the link in the main page "NITIN" AND i WANT TO USE HTML::TEMPLATE
FOR THIS BECAUSE I WILL BE LINKING A LOT OF THINGS IN THE SAME LINK IN
FUTURE.
But while running the script in the command line getting a error like
"
Content-Type: text/html; charset=ISO-8859-1
HTML::Template : Attempt to set nonexistent parameter 'some_data' -
this parameter name doesn't match any declarations in the template
file : (die_on_bad_params => 1) at 123.pl line 15
"
Can any body suggest me how to do this dynamic linking using
html::template module.
Or what is the eror in the script. where exactly the variable in
the .tmpl file is to be mentioned so that it will work.
regards
Nitin
=====================================================================
<html>
<head>
<title>Song Listing</title>
</head>
<body>
<h1>My Songs</h1>
<tr>
<td valign="top">
<table width="150%" border="1" cellpadding="3"
cellspacing="1">
<tr height="20" style="font-size: 95%;"><td> </td></tr>
<tr height="20" style="font-size: 95%;"><td align="left"
valign="middle"><a href="TMPL_VAR NAME=SOME_DATA">NITIN</a></td></tr>
</table>
</td>
<table>
</BODY>
</HTML>
=====================================================================
I have a cgi script as below to open this tmpl file from the web
browser.
The cgi script is mentioned as below.
======================================================================
#!/usr/bin/perl -w
use strict;
use lib "site/lib/perl5/5.8.5/";
use lib "site/lib/perl5/5.8.5/i386-linux-thread-multi/";
use lib "site/lib/perl5/site_perl/5.8.5/";
use lib "site/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/";
use CGI:retty qw/:standard/;
use CGI;
use CGI::Session;
use HTML::Template;
my $site = "http://www.google.co.in";
my $cgi = new CGI;
print $cgi->header();
my $template = HTML::Template->new(filename => "//usr//local//apache2/
templates//test.tmpl");
$template->param(SOME_DATA=> $site);
print $template->output;
1;
======================================================================
My requirement is to link some other page like http://www.google.co.in
to the link in the main page "NITIN" AND i WANT TO USE HTML::TEMPLATE
FOR THIS BECAUSE I WILL BE LINKING A LOT OF THINGS IN THE SAME LINK IN
FUTURE.
But while running the script in the command line getting a error like
"
Content-Type: text/html; charset=ISO-8859-1
HTML::Template : Attempt to set nonexistent parameter 'some_data' -
this parameter name doesn't match any declarations in the template
file : (die_on_bad_params => 1) at 123.pl line 15
"
Can any body suggest me how to do this dynamic linking using
html::template module.
Or what is the eror in the script. where exactly the variable in
the .tmpl file is to be mentioned so that it will work.
regards
Nitin