A
andy
I have a html file name test.html as below.
==================================================================
<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>
<tr height="20" style="font-size: 95%;"><td align="left"
valign="middle"><a href="<TMPL_VAR NAME=TEST_THIS_1>">SITE</a></td></
tr>
</table>
</td>
<table>
</BODY>
</HTML>
======================================================================
I am opening this html file using the below perl script.
======================================================================
#!/usr/bin/perl -w
use strict;
use CGI;
use CGI::Session;
use HTML::Template;
my $site = "http://www.google.co.in";
my $FILENAME="/usr/nitin/test_123.tmpl"
my $cgi = new CGI;
print $cgi->header();
my $template = HTML::Template->new(filename => "/usr/nitin/
test.tmpl");
#tried with all the below three options: as in the link of SITE of the
html page i want to open a different template file named
test_123.tmpl.
#my $FILENAME= HTML::Template->new(type => 'filename', source => "/usr/
nitin/test_123.tmpl");
#my $FILENAME= HTML::Template->new( filename => 'test_123.tmpl', path
=> [ '/usr/nitin/test_123.tmpl']);
#my $FILENAME= HTML::Template->new_file('test_123.tmpl', filename => '/
usr/nitin/test_123.tmpl');
$template->param(SOME_DATA=> $site);
$template->param(TEST_THIS_1=> $FILENAME);
print $template->output;
1;
=====================================================================
I am not able to open the test_123.tmpl file by using opening this
using this method.
Tried with TMPL_INCLUDE also. But not able to open the same.
Can anybody help me with the solution.
============================================================
After this I want to first click on NITIN and then on SITE. And then i
want a new page or template file . i.e after clicking on NITIN and
then SITE I want to open a new template file. Will it be done by
TMPL_IF tag under HTML::template module or is there any other way to
do that.
Kindly help me with the logic.
==================================================================
<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>
<tr height="20" style="font-size: 95%;"><td align="left"
valign="middle"><a href="<TMPL_VAR NAME=TEST_THIS_1>">SITE</a></td></
tr>
</table>
</td>
<table>
</BODY>
</HTML>
======================================================================
I am opening this html file using the below perl script.
======================================================================
#!/usr/bin/perl -w
use strict;
use CGI;
use CGI::Session;
use HTML::Template;
my $site = "http://www.google.co.in";
my $FILENAME="/usr/nitin/test_123.tmpl"
my $cgi = new CGI;
print $cgi->header();
my $template = HTML::Template->new(filename => "/usr/nitin/
test.tmpl");
#tried with all the below three options: as in the link of SITE of the
html page i want to open a different template file named
test_123.tmpl.
#my $FILENAME= HTML::Template->new(type => 'filename', source => "/usr/
nitin/test_123.tmpl");
#my $FILENAME= HTML::Template->new( filename => 'test_123.tmpl', path
=> [ '/usr/nitin/test_123.tmpl']);
#my $FILENAME= HTML::Template->new_file('test_123.tmpl', filename => '/
usr/nitin/test_123.tmpl');
$template->param(SOME_DATA=> $site);
$template->param(TEST_THIS_1=> $FILENAME);
print $template->output;
1;
=====================================================================
I am not able to open the test_123.tmpl file by using opening this
using this method.
Tried with TMPL_INCLUDE also. But not able to open the same.
Can anybody help me with the solution.
============================================================
After this I want to first click on NITIN and then on SITE. And then i
want a new page or template file . i.e after clicking on NITIN and
then SITE I want to open a new template file. Will it be done by
TMPL_IF tag under HTML::template module or is there any other way to
do that.
Kindly help me with the logic.