Two ways to do this:

Either set EXPOSE_BLOCKS to true in your config as per:
http://www.template-toolkit.org/pipermail/templates/2002-July/003460.html

Or Just process the entire include file, and the blocks will be imported. Then just process the block.

See this thread on details of that:
http://www.mail-archive.com/[email protected]/msg06588.html

-- Josh


Subbu Meiyappan wrote:
I know that we can 'PROCESS', 'INCLUDE' other templates from within a template. However, is it possible to call and process only a BLOCK within another template? Here is an example:
[%# -------- file1.tt <http://file1.tt> ---- %]
// some code
[% BLOCK file1blk %]
// code processed in the block
[% END %]
[%# ---- End of file file1.tt <http://file1.tt> ----- #]
Another file file2.tt <http://file2.tt>, calls file1.tt <http://file1.tt>
[% INCLUDE file1.tt/file1blk <http://file1.tt/file1blk> %]
Is this possible without having to save that block off into a seperate file?


_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to