Re: [Templates] Calling BLOCKS inside templates

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

From: merlyn (Randal L. Schwartz)
Subject: Re: [Templates] Calling BLOCKS inside templates
Date: 12:04 on 05 Mar 2005
>>>>> "Buddy" == Buddy Burden <buddy@xxxxxxxxx.xxx> writes:

Buddy> Josh,
>> Why don't you just use: [% PROCESS my_template.tt2 %] to include
>> your blocks into your pages?

Buddy> That would process the whole template, but I only need one part.

But once loaded, it's cached in memory.

[% PROCESS my_template.tt2 | null %]

would even ensure that the non-block output didn't interfere.

>> Then just process them as normal like:
>> [% PROCESS bar %].

Buddy> But I need to do this from the code,

as in $tt->process('bar') ?

        -- 
        Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@xxxxxxxxxx.xxx> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

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

(message missing)

[Templates] Calling BLOCKS inside templates
Buddy Burden 01:14 on 05 Mar 2005

Re: [Templates] Calling BLOCKS inside templates
Josh Rosenbaum 01:33 on 05 Mar 2005

Re: [Templates] Calling BLOCKS inside templates
Buddy Burden 05:55 on 05 Mar 2005

Re: [Templates] Calling BLOCKS inside templates
merlyn (Randal L. Schwartz) 12:04 on 05 Mar 2005

Re: [Templates] Calling BLOCKS inside templates
Buddy Burden 20:56 on 05 Mar 2005

Re: [Templates] Calling BLOCKS inside templates
Josh Rosenbaum 21:19 on 05 Mar 2005

Re: [Templates] Calling BLOCKS inside templates
Buddy Burden 21:41 on 05 Mar 2005

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52