[Zope] Test of existance of attributes
Sin Hang Kin
kentsin@poboxes.com
Thu, 27 Apr 2000 01:56:50 +0800
The code below do not works as I through: when the attribute expiredate is
not defined, it raise an error instead of display the sequence-item. How
can I detect the existence of the attribute before comparision?
Rgs,
Kent Sin
PS the code :
<dtml-in "objectValues(['DTML Document'])" sort="id" skip_unauthorized>
<dtml-if "expiredate and (expiredate - ZopeTime() ) >= 0.0 and not deleted">
<h2><dtml-var title_or_id></h2>
<dtml-if "AUTHENTICATED_USER.has_permission( 'Change DTML Documents',
_['sequence-item'])">
<a href="manage_edit">Edit</a>
</dtml-if>
<dtml-if "(ZopeTime() - _['bobobase_modification_time']) > Newdate">
<em>New</em>
</dtml-if>
<dtml-var sequence-item fmt="structured-text">
</dtml-if>
</dtml-in>