[Zope] getitem problem

Matt matt.bion@eudoramail.com
Sun, 19 Nov 2000 17:25:34 +1300


why does the first work and not the second ?
staticProperties is a dtmlDocument and container_metatype is a property
of it.

1)
<dtml-if "meta_type ==  staticProperties.container_metatype">
this is a container
<dtml-elif "meta_type == 'Folder'">
this is a folder
<dtml-else>
this is not a container
</dtml-if>


2)
<dtml-if "meta_type ==
_.getitem('staticProperties.container_metatype')">
this is a container
<dtml-elif "meta_type == 'Folder'">
this is a folder
<dtml-else>
this is not a container
</dtml-if>

the same will happen with :
<dtml-var "staticProperties.container_metatype">
<br>
<dtml-var "_.getitem('staticProperties.container_metatype',1)">


regards
Matt