RE: [Zope] Test if document does exist
You can check if the parent (usually a folder object, unless we are in a DTML Document, not a DTML method) has the special document object attribute. (tested) <dtml-if expr="_.hasattr(PARENTS[0], 'special_document_name')"> We have special_document <dtml-else> No joy. </dtml-if> This doesn't render the document or check to see if any of it's contents will raise a KeyError. Troy -----Original Message----- From: Chris Withers [mailto:chrisw@nipltd.com] Sent: Thursday, March 22, 2001 12:25 PM To: Marc Fischer Cc: zope@zope.org Subject: Re: [Zope] Test if document does exist Marc Fischer wrote:
How can I test with an dtml-if, if a special document does exist?
<dtml-if special_document_name> :-) Chris _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (1)
-
Farrell, Troy