Re: [Templates] PRE_PROCESS question

[prev] [thread] [next] [Date index for 2005/05/20]

From: Mark Mills
Subject: Re: [Templates] PRE_PROCESS question
Date: 13:20 on 20 May 2005
Bruce McKenzie wrote:

> My current bafflement is with the PRE_PROCESS process.
>
> I have a bunch of macros in a file called "macros.tt2"
> [in WebApp.pm]
> $self->tt_process( 'test.tt2', {  q => $q, t => $t1 , PRE_PROCESS => 
> 'macros.tt2'} );  # the first two vars arrive as expected, but no macros

Configuration options like "PRE_PROCESS" are used at the template object 
creation time, not tempate process time.

http://search.cpan.org/dist/Template-Toolkit/lib/Template.pm#SYNOPSIS

Somewhere, when creating your template object with something like:
   my $tt = Template->new(...)
You need to augment the "...", be it a variable or a raw hash-block, 
with the PRE_PROCESS setting. You can't send it to the template as a 
variable.

--mark mills

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] PRE_PROCESS question
Bruce McKenzie 13:00 on 20 May 2005

Re: [Templates] PRE_PROCESS question
Mark Mills 13:20 on 20 May 2005

Re: [Templates] PRE_PROCESS question
Cees Hek 15:01 on 20 May 2005

Generated at 15:56 on 25 May 2005 by mariachi v0.52