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

Module qm.external.DocumentTemplate.DT_If

Conditional insertion

Conditional insertion is performed using 'if' and 'else'
commands.

To include text when an object is true using the EPFS
format, use::

   %(if name)[
        text 
   %(if name)]

To include text when an object is true using the HTML
format, use::

   <!--#if name-->
        text 
   <!--#/if name-->

where 'name' is the name bound to the object.

To include text when an object is false using the EPFS
format, use::

   %(else name)[
        text 
   %(else name)]

To include text when an object is false using the HTML
format, use::

   <!--#else name-->
        text 
   <!--#/else name-->

Finally to include text when an object is true and to
include different text when the object is false using the
EPFS format, use::

   %(if name)[
        true text 
   %(if name)]
   %(else name)[
        false text 
   %(else name)]

and to include text when an object is true and to
include different text when the object is false using the
HTML format, use::

   <!--#if name-->
        true text 
   <!--#else name-->
        false text 
   <!--#/if name-->

Notes:

- if a variable is nor defined, it is considered to be false.

- A variable if only evaluated once in an 'if' tag.  If the value
  is used inside the tag, including in enclosed tags, the
  variable is not reevaluated.

Classes
Else  
If  
Unless  

Variable Summary
str __rcs_id__ = '$Id: DT_If.py 694 2003-04-16 02:53:50Z sc ...
str __version__ = '694'

Variable Details

__rcs_id__

Type:
str
Value:
'$Id: DT_If.py 694 2003-04-16 02:53:50Z sc $'                          

__version__

Type:
str
Value:
'694'                                                                  

Generated by Epydoc 2.1 on Thu Sep 27 15:49:05 2007 http://epydoc.sf.net