Edgewall Software

Version 9 (modified by cmlenz, 18 years ago) (diff)

--

Markup Templates

The most important feature provided by the Markup package is a template engine.

Templates are XML files of some kind (such as XHTML) that include processing directives identified by the namespace http://markup.edgewall.org/ and template expressions that are dynamically substituted by variable data.

Table of Contents

  1. Expressions
  2. Directives
    1. py:content
    2. py:replace
    3. py:attrs
    4. py:if
    5. py:choose / py:when / py:otherwise
    6. py:for
    7. py:def
    8. py:match
  3. Includes

Expressions

Python expressions can be used in text and attribute values. An expression is substituted with the result of its' evaluation against the template data. Expressions need to prefixed with a dollar sign ($) and usually enclosed by curly braces ({…}).

Directives

py:content

py:replace

py:attrs

py:if

py:choose / py:when / py:otherwise

py:for

py:def

py:match

Includes