[Zope] Acquisition acting wierd

Rik Hoekstra rik.hoekstra@inghist.nl
Tue, 11 Jan 2000 16:55:30 +0100


This is a multi-part message in MIME format.
--------------38CAE2CF282622B042CFA6E2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

 
--------------38CAE2CF282622B042CFA6E2
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

X-Mozilla-Status2: 00000000
Message-ID: <387B5144.5384168F@inghist.nl>
Date: Tue, 11 Jan 2000 16:50:28 +0100
From: Rik Hoekstra <rik.hoekstra@inghist.nl>
Organization: Instituut voor Nederlandse Geschiedenis
X-Mailer: Mozilla 4.5 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: itamars@ibm.net
Subject: Re: [Zope] Acquisition acting wierd
References: <387B4B22.268BBC90@ibm.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


> 
> We have the following folder structure
> 
> /-|
>   |-standard_html_header
>   |
>   |-all_about/-
>   |           |
>   |           |-standard_html_header
>   |
>   |
>   |-foods/-----
>               |
>               |-cheese
> 
> http://zope:8080/foods/all_about/cheese  or
> http://zope:8080/all_about/foods/cheese
> should acquire standard_html_header from all_about, not from the root
> folder.  But instead the stand_html_header from the top level is displayed.
> 
> What's wrong here?

This is an acquisition particularity that bites us all at one time of
another. It is about acquisition acquiring an object and its context:

The aquisition tree in the case of 
http://zope:8080/foods/all_about/cheese:

*cheese 
*(ac_context root) all_about -> first standard_html_header encountered
is that of all_about. root s_h_h is overridden
*(ac_context root) foods 

http://zope:8080/all_about/foods/cheese:

cheese
*(context root) foods -> first standard_html_header encountered the one
acquired from the root
*(context) all_about -> standard_html_header is already there.

For a more detailed explanation see my changing context in zope (draft
for z book) - last part.
url: http://www.zope.org/Members/Hoekstra/ChangingContexts1

hth

Rik

--------------38CAE2CF282622B042CFA6E2--