[Zope] use traversed subpath to insert REQUEST variables

Tobias Herp therp at apriori.de
Wed Sep 10 15:28:40 EDT 2003


Hi, you all,

I have a quite large Python product which publishes (possibly 
multi-language) pages based on layouts which are chosen based on the 
user agent. Unfortunately this doesn't cache very well, and there is a 
lot of REQUEST fiddling during the page computation.

So my idea is to put the language and layout information into the URL, 
e.g. www.my-site.com/en/default/home/ for the english version of the 
'/home' page, using the 'default' layout, and add the REQUEST variables 
which are set internally during traversal to the key variables used by 
the RAM cache manager.

I reckon I need to write a __bobo_traverse__ method for my site class 
(in this example, rewritten to the virtual host www.my-site.com) and 
return the 'home' page, inserting the appropriate REQUEST variables. Is 
there a How-To anywhere concerning this?

Thanks in advance,

Tobias





More information about the Zope mailing list