[Zope] Newbie <dtml-if> question

Tino Wildenhain tino@wildenhain.de
Fri, 07 Apr 2000 17:35:43 +0200


Stuart Foster wrote:
> 
> I have the following statement:
> 
> <dtml-if "'<dtml-var id>.jpg' in somelist">
>   DoSomething
> </dtml-if>
> 
*snip*

Someone has to mention there is an other potential error:
id is probably the id of the current folder/document.
So to be on the safe side, try to use an other variable.

You might also want to use:

<dtml-if "somelist.has_key(_.str(id_var)+'.jpg')">
...
</dtml-if>

if "somelist" is a folderish object.

HTH
Tino Wildenhain