[Zope] is <dtml-unless someIndirectVariable> possible ?

Didier Georgieff Didier Georgieff <dgieff@divinerites.com>
Sun, 27 Aug 2000 06:13:33 +0100


I have a lot of REQUEST like this one to check, depending on what 
documents are in the folder.

<dtml-unless SOMEREQ>
<dtml-call "REQUEST.set('SOMEREQ','defaultvalue')">
</dtml-unless>

so i gave all documents concerned 2 properties 
myPropName,myPropValue

(in our example 
myPropName : SOMEREQ
myPropValue : defaultvalue)

So i'm able to iterate the documents and check the properties and 
set the REQUEST.

<dtml-in "objectValues(['DTML Document'])">
 <dtml-if "_.hasattr(this(), 'myPropName') == 1">
  <dtml-call "REQUEST.set(myPropName,myPropValue)">
 </dtml-if>
</dtml-in>

this works OK.

But, I can't find a way to generate the 
<dtml-unless SOMEREQ> tag.

Passing the value of myPropName seems to fail (erreur while 
parsing the syntax, or check the 'myPropName' instead of his 
value).
I tried a lot of things and syntax around <dtml-unless 
myPropName>, but it failed.

Is it a dtml-unless limit, or just a bad syntax i'm writing ?
Thnaks in advance.