[Zope] Re: use traversed subpath to insert REQUEST variables

Tobias Herp therp at apriori.de
Thu Sep 11 12:38:12 EDT 2003


Dieter Maurer schrieb:
> Tobias Herp wrote at 2003-9-10 14:28 +0200:
>  > ...
>  > 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?
> 
> You can also use a SiteAccess AccessRule for this purpose.
> There is a HowTo on Zope.org (a bit outdated, be careful).

Hi, Dieter,

thanks for answering. I hoped to avoid the AccessRule thing and have a 
solution inside my portal product (which can contain site objects in 
varying level depths). A site object would easily know e.g whether or 
not the two following path elements are a valid language and layout.

Is it more difficult or dangerous to use the __bobo_traverse__ method?

Thanks,

Tobias





More information about the Zope mailing list