> Date: Mon, 28 Jul 2008 17:13:58 -0400
> Subject: Re: [htmltmpl] Leaving tmp_var intact inside template
>
> city crew wrote:
>
> > 2. store template output into a scalar and to a regexp subst on the
> > scalar before printint that to the file.
> >
> > my $templateRef = $template->output;
> > $templateRef =~ s/&lt;TMPL_/<TMPL_/g;
> > print TEMP $templateRef;
> >
> > As I am writing this I think I'm going to go with solution 2 as it
> > outputs the file and doesn't require any filter on loading the second
> > template.
>
> We do something similar to your #2. We use a slightly more obvious
> syntax though. We use <TMPL_VAR> for things that are being loaded on the
> first pass and <DYN_VAR> for things on the 2nd pass.

I like that, I was experimenting with !TMPL_VAR but yours seems more semantically appealing. (I'm practicing my impressive technical speak there...)
 
>
> Just FYI, I've heard this technique named a couple of different things,
> in case you want to impress anyone :) It's usually called "2 pass
> templating" or "Write-thru cache templating".
 
Nice! I'll try impress my wife with "Write-thru cache templating", maybe I'll get lucky. =o)
 
Grant

>
> --
> Michael Peters
> Plus Three, LP
>



Click here. Want to help Windows Live Messenger plant more Aussie trees?