[Zope] Reverse Aquisition!

Casey Duncan casey@ZOPE.COM
Fri, 11 Apr 2003 14:25:32 -0400


On Friday 11 April 2003 10:19 am, Mark Stangroom wrote:
> I know aquistion in Zope works it way up the tree until it reaches the
> root so you can embed one document in another when its higher up the
> tree.
>=20
> Is it possible to do this in reverse so that i can embed a document
> which is in a sub directory lower down the tree?
>=20
> Hope this makes sense!

This is a standard lookup. Acquisition could be used to acquire the sibli=
ng=20
folder, from there you use standard attribute access. Given a hierarchy=20
like::

  Root
  |
  +- colors
  |    |
  |    +- blue
  |        |
  |        +- description
  |
  +- template.pt

=46rom inside template.pt, you could access description.pt like so::

  here/colors/blue/description

In a Python expression you would use::

  python: here.colors.blue.description

In a python script that would look like::

  context.colors.blue.description

hth,

-Casey