Re: [Templates] Calling BLOCKS inside templates

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

From: Buddy Burden
Subject: Re: [Templates] Calling BLOCKS inside templates
Date: 05:55 on 05 Mar 2005
Josh,

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

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

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

But I need to do this from the code, not from within the template.  In this 
particular case, I'm processing some web pages using OpenThought 
(http://www.openthought.net/) and I need to refresh individual portions of the 
page without refreshing the entire page.

> If you put only blocks in my_template.tt2 there 
> should be no problem.

But in this case, there are other things beside blocks.  It's sort of like my 
template is my "main", and the blocks are my sub's.  I want to keep each of my 
templates corresponding to a given web page, except for a few "library" 
templates which contain routines that have to be shared amongst several 
different pages.  For me as a programmer, that makes the most sense, as it 
parallels normal Perl development, and for my web designer, that makes the 
most sense, as it (mostly) parallels normal HTML development.


		-- Buddy

_______________________________________________
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