Table of Contents

Module: DT_Let qm/external/DocumentTemplate/DT_Let.py

The Let tag was contributed to Zope by and is copyright, 1999 Phillip J. Eby. Permission has been granted to release the Let tag under the Zope Public License.

Let name=value...

The let tag is used to bind variables to values within a block.

The text enclosed in the let tag is rendered using information from the given variables or expressions.

For example::

<!--#let foofunc="foo()" my_bar=bar--> foo() = <!--#var foofunc-->, bar = <!--#var my_bar--> <!--#/let-->

Notice that both name and expr style attributes may be used to specify data. name style attributes (e.g. my_bar=bar) will be rendered as they are for var/with/in/etc. Quoted attributes will be treated as Python expressions.

Variables are processed in sequence, so later assignments can reference and/or overwrite the results of previous assignments, as desired.

Functions   
parse_let_params
  parse_let_params 
parse_let_params (
        text,
        result=None,
        tag='let',
        parmre=regex.compile( '\([\0- ]*\([^\0- =\"]+\)=\([^\0- =\"]+\)\)' ),
        qparmre=regex.compile( '\([\0- ]*\([^\0- =\"]+\)="\([^"]*\)\"\)' ),
        **parms,
        )

Exceptions   
ParseError, ( 'invalid parameter: "%s"' % text, tag )
Classes   

Let


Table of Contents

This document was automatically generated on Mon Jan 3 09:42:36 2005 by HappyDoc version 2.1