RE: [Zope] dtml-with this only broken?
Try this (untested): <dtml-with expr="this().aq_explicit" only> The aq_explicit attribute replaces the implicit acquisition wrapper with an explicit one, effectively disabling acquisition for most cases. -Randy
-----Original Message----- From: Ron Bickers [mailto:rbickers@logicetc.com] Sent: Friday, March 23, 2001 11:47 AM To: Dieter Maurer Cc: zope@zope.org Subject: RE: [Zope] dtml-with this only broken?
Ok... I think I might understand now, but what do you mean by this? What is it almost unusable?
"Note I was tempted to use the only argument to achieve this. However, this argument is almost unusable. You probably should forget about it."
Is it true, then, that even though this() is the only namespace in the stack, acquisition is still effective and thus my attribute is still being acquired? If this is the case, is there a simple way to use dtml-with and get only this() without acquisition? _______________________
Ron Bickers Logic Etc, Inc. rbickers@logicetc.com
-----Original Message----- From: Dieter Maurer [mailto:dieter@handshake.de] Sent: Friday, March 23, 2001 2:20 PM To: Ron Bickers Cc: zope@zope.org Subject: Re: [Zope] dtml-with this only broken?
Ron Bickers writes:
It seems that <dtml-with "this()" only> doesn't do what one would expect. My 'description' is still being acquired. I found in the mailing list that I can use something like <dtml-if "_.hasattr(aq_explicit, 'description')">, but why doesn't the with only work? Please read the sections "Name Lookup" and "DTML -> Commands -> with" in
URL:http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html
You will probably recognize that the expectations were wrong....
_______________________________________________ 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 )
Works like magic, as many things in Zope do. :-) Thanks! _______________________ Ron Bickers Logic Etc, Inc. rbickers@logicetc.com
-----Original Message----- From: Randall F. Kern [mailto:randy@spoke.net] Sent: Friday, March 23, 2001 3:06 PM To: Ron Bickers; Dieter Maurer Cc: zope@zope.org Subject: RE: [Zope] dtml-with this only broken?
Try this (untested):
<dtml-with expr="this().aq_explicit" only>
The aq_explicit attribute replaces the implicit acquisition wrapper with an explicit one, effectively disabling acquisition for most cases. -Randy
participants (2)
-
Randall F. Kern -
Ron Bickers