> But I get this error:
>
> access to /job failed for 10.3.4.107, reason: file error - parse error:
> /usr/lsd/apache-ssl/htdocs/MIS_APPS/RHS_HTDOCS//CrewList.html line 73:
> unexpected token (BLOCK)
> -- text = BLOCK
I can't explain this. Perhaps that is some typo or cruft before this
directive. Hmmm, I'm also a bit suspicious of the error message: as
far as I can see TT2's parse errors are formatted as " [% $text %]",
not " -- $text". What version of TT do you have?
Anyhow, attached is a self-contained example that works for me.
Good luck.
Craig
use Template;
my $tt = Template->new();
$tt->process(\*DATA, {
job => "jjjj",
ref => {
first => "ffff",
"1" => "one",
}
}) || die $tt->error();
__DATA__
[% text = BLOCK -%]
<A HREF="/job?page=CrewEditPage&job=[% job %]&code=[% ref.first %]"
><font face="sans-serif, Arial, Helvetica" size="2">[% ref.1 %]</FONT></A>
[%- END; text; %]