[Zope] Checking for a boolean property value in DTML

complaw@hal-pc.org complaw@hal-pc.org
Fri, 15 Jun 2001 00:36:46 GMT


I have a boolean property in a DTML Document.  The boolean property is called 
"mental_steps_doctrine".  I want to list those documents that have 
mental_steps_doctrine set to "TRUE".  I know for a fact that one of the DTML 
Documents in question has mental_steps_doctrine set to TRUE (i.e., checked).

However, the following code fails to list that case:

      <dtml-in expr="objectValues('DTML Document')" sort="decision_date" 
reverse>
        <dtml-if expr="document_type == 'case'">
          <dtml-if expr="mental_steps_doctrine == 1">
            <a href="&dtml-absolute_url;"><dtml-var title></a><br>
          </dtml-if>
        </dtml-if>
      </dtml-in>


Instead, it doesn't list any case at all.

Incidentally,

<dtml-if mental_steps_doctrine> 

or

<dtml-if expr="mental_steps_doctrine"> 

didn't work.  Can someone give me a wee bit of help on syntax here?  

Thanks to all,

Ron