[Zope] Avoiding acquisition aka testing for contained objects
Stefan H. Holek
stefan@epy.co.at
Wed, 15 Nov 2000 13:41:05 +0100 (CET)
If I want to know whether a certain object is contained in
the current folder I do this:
<dtml-if "'index_html' in this().objectIds()">
yes it's here
<dtml-else>
not here
</dtml-if>
Id like to know whether this is the best/most efficient way to do it.
Things like hasattr() are subject to aquisition i.e. they would find
an index_html method along the acquisition path; something I do not
want. I also cannot bracket everything in a <dtml-with ... only> because
chopping my namespace is not what I want either.
TIA,
Stefan
--
Things work better when plugged in