Template2
Template2 copied to clipboard
EXPOSE_BLOCKS not documented
It doesn't appear that EXPOSE_BLOCKS
is documented anywhere on the http://www.template-toolkit.org/ site. The only place to find out about it is in the O'Reilly book.
Ok do you want to give us a summary of what you now understand? Or maybe a patch?
I guess I would add to this page:
http://www.template-toolkit.org/docs/manual/Config.html
In this section:
http://www.template-toolkit.org/docs/manual/Config.html#section_Template_Files_and_Blocks
something like:
Normally a block is only processed as part of the template in which it's contained. The
expose_blocks
option allows you to process a block in isolation, using the following syntax:
[% PROCESS <templatename>/<blockname> %]
For example if you had a navbar block defined in your header.tt and wanted to render the same navbar in some other context without the surrounding header code, you could useexpose_blocks
and then
[% PROCESS header/navbar %]