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: 21:41 on 05 Mar 2005
Josh,

> One solution to this might be to make a single file that has nothing but 
> your shared BLOCKs in it.

Well, two potential problems with that ...  The first is that I'm still not 
getting all the (major) HTML for each page into its own template.  I suppose I 
could adopt a policy of having _two_ templates per page instead of one ... for 
a given page fred, we could have fred.tt2 and fred_blocks.tt2 or somesuch.  It 
saves a certain amount of chasing down (if it isn't in the one, it's almost 
certainly in the other), but it's still more of a paradigm shift for my HTML 
designer than I _want_ to force on her (not saying I won't consider it, but 
it's not optimal).

> Then at the top of your pages (ie. my_template.tt2) use:
> 
> [% PROCESS $standard_include | null %]

The second problem is that I would actually have to put this PROCESS into 
every single block, rather than once at the top of the page.  But maybe that 
isn't really a problem ... I guess it doesn't really hurt anything, if the 
template pointed to by $standard_include doesn't have anything but other 
BLOCKs in it.


		-- 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