[Zope] Testing if a string isn't empty

Thomas B. Passin tpassin@mitretek.org
Wed, 16 May 2001 10:30:23 -0400


<dtml-let st="''"> <!--create an empty string - "-'-'-" -->
   <dtml-if "not st"><!-- test it -->
     The test worked <!--voila!-->
   </dtml-if>
</dtml-let>

Tom P

[Gitte Wange]

I am trying to make some dtml code that tests if a string contains text 
(because if the string is empty it must be set to contain 'Clipname').

Right now the code looks like this:
<dtml-if expr="mc_name == ''">
  <dtml-let mc_name="'Clipname'">
   <dtml-call sqlAddClip>
  </dtml-let>
</dtml-if>

How do you do it - because the above doesn't work.