Metal Article Index for
Metal
Articles about
Metal
Website Links For
Metal
 

Information About

Metal





OVERVIEW


METAL complements TAL with the ability to reuse code. It allows to define and use macros, which in turn may have ''slots''; when using a macro, variational content can be specified for a slot.

When generating XML documents, the XML namespace must be specified
(xmlns:metal="http://xml.zope.org/namespaces/metal").


ATTRIBUTES

The following attributes are recognised, normally requiring a „metal:“ prefix:

; define-macro
: creates a macro
; define-slot
: creates a slot inside a macro
; use-macro
: uses a macro (normally given via a TALES path expression)
; fill-slot
: when using a macro, replaces the default content of the given slot
; extend-macro
: since , by redefining of slots

Normally, just one of those is used at a time.

In cases when no tag is present which lends itself to take the attributes, and in special cases when more than one METAL attribute is needed, special METAL tags can be used, making the „metal:“ prefix optional. E. g. (sketched with Roundup in mind):

<html metal:define-macro="icing">
...
<metal:myslot define-slot="optional-form"/>
...
</html>

<html metal:use-macro=" Templates/page/macros/icing ">
<form metal:fill-slot="optional-form" action="."
">
...
</form>

</html>


USAGE


TAL / TALES /METAL are used by the following projects:



WEBLINKS