[Zope] dtml-with this only broken?

Randall F. Kern randy@spoke.net
Fri, 23 Mar 2001 12:05:53 -0800


Try this (untested):

<dtml-with expr=3D"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?
>=20
>=20
> Ok... I think I might understand now, but what do you mean by=20
> this?  What is
> it almost unusable?
>=20
> "Note
> I was tempted to use the only argument to achieve this. However, this
> argument is almost unusable. You probably should forget about it."
>=20
> Is it true, then, that even though this() is the only namespace in the
> stack, acquisition is still effective and thus my attribute=20
> is still being
> acquired?  If this is the case, is there a simple way to use=20
> dtml-with and
> get only this() without acquisition?
> _______________________
>=20
> Ron Bickers
> Logic Etc, Inc.
> rbickers@logicetc.com
>=20
>=20
> > -----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 ->=20
> Commands -> with" in
> >
> >   URL:http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html
> >
> > You will probably recognize that the expectations were wrong....
>=20
>=20
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -=20
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>=20