[Zope] specializing folders

J Cameron Cooper jccooper at jcameroncooper.com
Tue Aug 26 19:52:31 EDT 2003


>I have a portion of a site which originally consisted of a single folder
>with content.  In the reorganized site, this folder consists of a
>collection of folders. For specificity, the structure looks like
>
>     +--A--+--A1
>	   |
>           +--A2
>           |
>           +--A3
>	   |
>
>Depending upon a parameter derivable from the HTTP_HOST name, I want 
>either A1, A2, A3, or ... to behave as if it were A to all the other 
>code in the site.  Of course, A1,A2,... should be able to hold code and/or
>data.  
>
>I would have though that some sort of local use of a VHM and or SiteAccess
>would allow this, but I've been unable to make it work.  Any suggestions?
>hints?
>  
>
You'll probably have to end up doing this yourself, but maybe one of 
these would work:

http://zope.org/Members/TheJester/PortableHole
http://zope.org/Members/andym/Rewriter
http://zope.org/Members/astaubo/Redirector

At least they can give you a pointer on how to do the sort of proxying 
you want. I never was able to get Rewriter or Redirector to work (which 
is why I wrote the v. simple MovedObject) but maybe you'll have better luck.

If you do it yourself, you will probably make A an instance of your own 
product which extends folder but over-writes the appropriate methods 
(traversal and call and whatnot) to make something called on it actually 
use its contents.

I have to say, naturally, that this seems like a very strange thing to 
do, and I half suspect that there's a different design that will make 
things easier. But I'm sure you have your reasons.

          --jcc




More information about the Zope mailing list