5 Jul
2002
5 Jul
'02
8:38 p.m.
Jaroslav Lukesh writes:
... | The following code is not completely safe but may be sufficient | for your purposes: | | <dtml-if "_.hasattr(aq_explicit,'index.htm')"> | <dtml-var index.htm> | <dtml-else>.... | </dtml-if>
Absolutelly sufficient and works :)
Why it is not completely safe? It restricts acquisition somewhat but not completely.
Please read the "Acquistion" section for "explicite acquisition" in <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html> "aq_explicit" returns an explicit acquisition wrapper for an implicit one. Explicit acquisition wrappers still acquire when "aq_self" is itself a wrapped object. Dieter