Zope - 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:  Zope

Famous quotes containing the word page:

    Envy has blackened every page of his history.... The future, in its justice, will number him among those men whom passions and an excess of activity have condemned to unhappiness, through the gift of genius.
    Eugène Delacroix (1798–1863)