Package qm :: Package external :: Package DocumentTemplate :: Module DT_Let
[hide private]
[frames] | no frames]

Module DT_Let

source code

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.

Classes [hide private]
  Let
Functions [hide private]
 
parse_let_params(text, result=None, tag='let', parmre=re.compile(r'([\x00- ]*([^\x00- ="]+)=([^\x00- ="]+))'), qparmre=re.compile(r'([\x00- ]*([^\x00- ="]+)="([^"]*)")'), **parms) source code
Variables [hide private]
  __package__ = 'qm.external.DocumentTemplate'