[Templates] beginner question
Kirk Rogers
kirk.rogers@verizon.net
Fri, 1 Mar 2002 14:46:45 -0800
>"Kirk Rogers" <kirk.rogers@verizon.net> writes:
>
>> Thanks. But is there some way to substitute <!--#include
>> file=template.html--> to tell the tt that this is the tag I want
>to use for
>> server side includes?
>>
>
>you can use server-side includes just as you normally would.
>alternatively, take a look at the template toolkit's INCLUDE directive.
>http://www.template-toolkit.org/docs/default/Manual/Directives.html
>
>how are you processing your templates?
Right out of docs:
$include_templates = {
header => 'header.html',
footer => 'footer.html'
}
$params = {
var1 => 'test',
var2 => 'another',
includes => $include_templates
};
my $tt = Template->new( $CONFIG ) || warn($Template::ERROR);
$tt->process($template, $params) || return fail( $query, $tt->error() );
We're using dreamweaver and it allows as in include statement:
<!--#INCLUDE file="header.html"-->
which it automatically pulls into the workspace and displays the header in
the GUI tool. We were hoping to use the same directive in TT so we could
develope the pages without having to do too much. Wishful thinking perhaps?
Thanks for the help,
Kirk