[Zope] How to give caller acquisition path to an object through python script ?

Casey Duncan cduncan@kaivo.com
Fri, 01 Jun 2001 08:30:21 -0600


Gilles Lenfant wrote:
> 
> I'm in process to make a multilingual site using Zope.
> My design is based on setting a cookie "favoritelanguage" to "en"/"fr"/"es"
> (...) depending on the user preference chosen in the home page.
> The python script "intlobject(anobject)" is used in a main DTML
> document/method as <dtml-var "intlobject('subobject')">.

Which is it? A DTML Document won't do what you want.

> This renders the object of en/subobject, fr/subobject (depending on the
> "favoritelanguage" cookie) in the main document.
> But the so included object uses the acquisition path of the FOLDER that
> contains the "main" object rather than the acquisition path of the "main"
> object itself.
> I need it to act just as an "#include " in C.

How does the Python script call the subobject? What arguments do you
pass it?

> 
> Thanks !
> 
> --Gilles
> 
-- 
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>