Template Attribute Language, the preferred template definition system in Zope and Plone. Uses XML Namespaces and validates cleanly, but is frustrating for logic — which is good because TAL prefers your logic go in special Python functions, not in the templates.
Macro Expansion TAL (METAL) adds in cross-template integration functionality. A template using DTML looks like this:
<dtml-var standard_html_header>
<p>
Page contents come here.
</p>
<dtml-var standard_html_footer>
Where the standard_html_header and standard_html_footer items define the beginning and the end of the page, with the template filling in the middle. This approach has its obvious limits. METAL, in contrast, uses a two-piece template approach where a master defines the page layout and the available slots, while the context-specific template refers to this master and fills the available slots.
Sample master template (object name “main_template”):
<html>
<head>
<title>Fixed title, no slot available</title>
</head>
<body metal:define-macro="body">
<p>
Introductory text, always present.
</p>
<div metal:define-slot="main">
"Main" slot, to be replaced by context-specific template.
</div>
<p>
More fixed text.
</p>
<div metal:define-slot="footer">
Another slot, to be replaced by template.
</div>
</body>
</html>
And a context-specific template, called via the object it applies to:
<html>
<body metal:use-macro="here/main_template/macros/body">
<p metal:fill-slot="main">
This text appears in the main slot defined above.
</p>
</body>
</html>
Plone skinning depends entirely on TAL and METAL for content and CSS for layout.
