Hi all, I have some problems with tt2.
I am not practice, but I'm learning.
I'm to do my personal web site.
I have the following:
/home/savio/.ttreerc
/home/savio/templates/src
/home/savio/templates/lib
/home/savio/templates/lib/config
/home/savio/html
/home/savio/cgi-bin
I want create dinamically a web page with tt2 that I build with ttree utility.
There are the following files:
1)
/home/savio/templates/src/page.html
[% INCLUDE header2 %]
[% INCLUDE body %]
[% INCLUDE footer %]
2)
/home/savio/templates/lib/body
that it contains some html code.
3)
/home/savio/templates/lib/config/main
for template.title declaration.
My perl code is the following:
#!/usr/bin/perl
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use Template;
my $cgi = CGI->new();
print $cgi->header('text/html');
my $tt2 = Template->new({
INCLUDE_PATH => ['/home/savio/netstore/templates/src',
'/home/savio/netstore/templates/lib'],
PRE_PROCESS => 'config/main',
EVAL_PERL => 1,
}) || die $tt2->error(), "\n";
$tt2->process('welcome.html') or die $tt2->error(), "\n";
The error message is "file error - page.html: not found".
What is the problem?
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates