[Zope] Problem with Aquisition
Karsten Kraus
Karsten.Kraus@swr3.de
Tue, 21 Aug 2001 01:47:36 +0200
Hi there,
I've got some problems understanding Zope's aquisition mechanism.
I have created a directory structure like this:
FolderA/
|- Grafix/
| |- image1
|- FolderB/
|- standard_html_header
|- someothermethod
|- somedoc
|- Grafix/
| |- image2
|- image3
|- FolderC/
|- somedoc
|- FolderD/
| |- somedoc
|- Grafix/
|- image2
I have some Image-Objects in each of the "Grafix" folders.
In the topmost 'Grafix/'-Folder lies global stuff like headers and neutral
logos.
In 'FolderB/Grafix/' lies stuff only used by FolderBs childs
In 'FolderC/Grafix/' is an Image-Object which should replace image2 in
'FolderB/Grafix/'
with the same ID.
The standard_html_header method now should show 'image1',
'someothermethod' - which it self should show
'image2' depending on the object it's called from (to show different logos
for 'FolderB/somedoc' and
'FolderC/somedoc' - and image3.
The 'somedoc'-Documents call standard_html_header, which looks like this:
------- std_html_hd ---------
<dtml-var "Grafix.image1">
<dtml-var someothermethod>
<dtml-var "Grafix.image3">
-----------------------------
I get a bunch of AttributeErrors because "Grafix.image1" can't be found in
FolderB, Grafix.image3 can't be found in FolderC. Grafix.image2 is found in
FolderB, FolderC and FolderD, as I expected, so aquisition obviously works
here...
My question is: Why doesen't work the aquisition for Grafix.image1 and
Grafix.image3?
And how could I work around this problem (in real life, the 'Grafix'-Folders
contain lots of images, so I can't put them in their parent-folders and
giving each Grafix-Folder an unique name isn't a solution to the problem
either ;-(
TIA
Karsten