[Zope] aquiring objects upward in DTML

Casey Duncan casey@zope.com
Mon, 19 Aug 2002 12:58:29 -0400


Maybe try:

_.getattr(aq_parent, _.getitem('sequence-item'))

hth,

-Casey

On Monday 19 August 2002 05:49 am, Dan Jacobs wrote:
> Andy,
>=20
> I'm not explaining the problem properly...
>=20
> we're iterating through a sequence of object names
>=20
> so
>=20
> aq_parent[ _.getitem('sequence-item')]
> but that only looks one level up.
> I tried
> aq_acquire( _.getitem('sequence-item'))
> and
> aq_parent.aq_acquire( _.getitem('sequence-item'))
>=20
> Thanks,
>=20
> Dan
>=20
>=20
> On Sun, 18 Aug 2002, Andy McKay wrote:
>=20
> > Just use the object's name in a variable. If do <dtml-var
> > standard_html_footer> DTML will find the "closest" standard_html_foot=
er in
> > the stack, going up to the root folder if need be.
> > --
> >   Andy McKay
> >   Agmweb Consulting
> >   http://www.agmweb.ca
> >
> >
> > ----- Original Message -----
> > From: "Dan Jacobs" <dan@caliginous.com>
> > To: <zope@zope.org>
> > Sent: Sunday, August 18, 2002 12:36 PM
> > Subject: [Zope] aquiring objects upward in DTML
> >
> >
> > > Hi,
> > >
> > > Is there an easy way within a DTML method to acquire a named object=
 that
> > > may be anywhere upward.
> > >
> > > At the moment I'm looking at the parent by doing
> > > aq_parent['name']
> > > but that only looks one level up.
> > > I tried
> > > aq_acquire('name')
> > > and
> > > aq_parent.aq_acquire('name')
> > > but they don't work.
> > >
> > > Thanks,
> > >
> > > Dan
> > >
> > >
> > > _______________________________________________
> > > 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 )
> > >
> >
> >
>=20
>  - Dan Jacobs
>  - 07956 246 659
>=20
>=20
>=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