Subject: Re: [Zope] Acquisition acting wierd
From: Rik Hoekstra <[email-masked]>
To: [email-masked]
Date: Tue, 11 Jan 2000 16:50:28 +0100

> 
> 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