Blue Bream - Zope Page Templates

Zope Page Templates

As mentioned previously, Zope Page Templates are themselves XHTML documents, which means they can be viewed and edited using normal HTML editors or XHTML compliant tools (a big advantage compared to other template languages used for Web applications). Templates can also be checked for XHTML compliance so you can be fairly confident that they will automatically expand into proper XHTML.

However, these page templates are not meant to be rendered as is. Instead they are marked up with additional elements and attributes in special XML namespaces (see below). This additional information is used to describe how the page template should ultimately be processed.

Here are some basic examples. To conditionally include a particular element, like a div element, simply add the tal:condition attribute to the element as follows:

...

To control what appears inside an element, use the tal:content attribute like this:

Read more about this topic:  Blue Bream

Famous quotes containing the word page:

    “If Steam has done nothing else, it has at least added a whole new Species to English Literature ... the booklets—the little thrilling romances, where the Murder comes at page fifteen, and the Wedding at page forty—surely they are due to Steam?”
    “And when we travel by electricity—if I may venture to develop your theory—we shall have leaflets instead of booklets, and the Murder and the Wedding will come on the same page.”
    Lewis Carroll [Charles Lutwidge Dodgson] (1832–1898)