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

Module DT_With

source code

Nested namespace access

The 'with' tag is used to introduce nested namespaces.

The text enclosed in the with tag is rendered using information from the given variable or expression.

For example, if the variable 'person' is bound to an object that has attributes 'name' and 'age', then a 'with' tag like the following can be used to access these attributes:

 <!--#with person-->
   <!--#var name-->,
   <!--#var age-->
 <!--#/with-->

Eather a 'name' or an 'expr' attribute may be used to specify data. A 'mapping' attribute may be used to indicate that the given data should be treated as mapping object, rather than as an object with named attributes.


Version: 1069

Classes [hide private]
  With
Variables [hide private]
  __rcs_id__ = '$Id: DT_With.py 1069 2008-11-13 21:55:43Z stefan $'
  __package__ = 'qm.external.DocumentTemplate'