[Zope] conceptual problem with acquisition

Oliver Frommel oliver@aec.at
Mon, 5 Mar 2001 12:35:53 +0100 (CET)


Hello,

although I already created some sites with Zope I now encountered a problem
that I am not able to solve with acquisition, i.e. to make a parent subfolder
work as a fallback resource. Directories look like this:

/pics/logo.gif
/dir/subdir1/pics/logo.gif
/dir/subdir1/index_html (subdir1 is a zclass and index_html a method of it)
/dir/subdir2/pics/logo.gif
/dir/subdir2/index_html (subdir2 is a zclass and index_html a method of it)
/dir/subdir3/pics/   (empty!)
/dir/subdir3/index_html (subdir3 is a zclass and index_html a method of it)


The index_html contains a reference to the pic: <img src="pics/logo.gif">
Now when the subdirX/pics/ doesn't not contain a logo.gif, acquisition also
does not work because it stops on finding the pics folder in the subdirX.
This is exactly the scenario, Rik Hoekstra describes in 
http://www.zope.org/Members/Hoekstra/ChangingZopeContexts.

Unfortunately non of the workarounds he mentions are appropriate because
a) I need an image folder for each subdir (see below)
b) I can't reference images from the parent
c) the pic directories need to have the same name

this all because the rationale behind this is to enable index_html to look
differently _dependent_ on the existence of logo.gif.
the site designers are meant to be able to change index_html's appearance
just by uploading a new logo.gif. If this is not present, the one of the 
parent should be used. 

I think it would work if I put the images directly in subdirX and in the
root dir but this is pretty ugly and should only serve as a last ressort IMHO.

is there any way / product / trick to make this concept work with subdirs??

thanks for your help
--Oliver