Macro Expansion for TAL (or METAL)¶
Macros provide a way to define a chunk of presentation in one template, and share it in others, so that changes to the macro are immediately reflected in all of the places that share it.
Macros are a special set of TAL statements that are processed separately from other statements. There are statements to define macros and macro slots, and to use macros and provide macro arguments. When a template which uses METAL macros is rendered, it expands them before processing other TAL statements.
PageTemplates implement METAL, and expand all of the macros used in a template when generating its source, as well as when rendering it. This allows macros to be viewed in-place.
See the METAL specifications for details of what METAL provides: