Re: [Templates] Calling BLOCKS inside templates
[prev]
[thread]
[next]
[Date index for 2005/03/05]
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)
|