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

Eric Balasbas ebalasba@bway.net
Thu, 31 May 2001 13:58:52 -0400 (EDT)


The short answer is that you want to use the <dtml-with expr="expression">
tag. The long explanation can be found in the two urls below.

http://www.zope.org/Documentation/How-To/AdvancedDTML
http://www.zope.org/Members/Hoekstra/ChangingZopeContexts


Eric Balasbas
Senior Developer
eric@virtosi.com

http://www.virtosi.com/
Virtosi Ltd.
Design -- Branding -- Zope


On Thu, 31 May 2001, Gilles Lenfant wrote:

> Hi,
>
>
> Sorry for the previous post. It was obscure. So I'm rewording it.
>
> I's not possible to expose my problem with a simple phrase. So I'll write
> down an example:
>
> I got a "main" DTML method that contains:
>
> -- DTML method "main" --
> ...
> <dtml-var "getobject(somearg)">
> ...
> ---------------------------
>
> "getobject" is a python script that finds a Zope object (DTML method or
> document) depending on "somearg".
>
> -- Python script "getobject" --
> # find someobject depending on "somearg"
> ...
> return someobject(context)
> -----------------------------
>
> The problem is that "someobject" renders using the acquisition path of the
> FOLDER that contains "main"
> I want the "someobject" to use the acquisition path of the "main" DTML
> object rather than the one of it's folder.
>
> Any clue ?
>
> TIA
>
> --Gilles
>
>
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>