[Zope] more info for manage_exportObject question
Kevin Dangoor
kid@kendermedia.com
Thu, 24 Feb 2000 17:41:41 -0500
I think you're going to have to use something like the string.split
function. (Look in the _ namespace section of the DTML guide). I don't
believe there is a single function that you can call that will do what you
want.
Doing this in a PythonMethod (which is a lot easier on the brain), you would
probably do something like:
obj = self
parts = string.split(PathToItem, '.')
for part in parts[:-1]:
obj = obj[part]
obj.manage_exportObject(id=parts[-1])
I'd rather not try to convert that to DTML :)
Kevin
----- Original Message -----
From: "Daniel G. Rusch" <drusch@globalcrossing.com>
To: <zope@zope.org>
Sent: Thursday, February 24, 2000 4:38 PM
Subject: [Zope] more info for manage_exportObject question
> Consider:
>
> FolderA
> SomeOtherItem
> FolderB
> ItemToExport
>
> I can export ItemToExport from FolderA by calling: (Item ==
> ItemToExport)
>
> <dtml-with "FolderA.FolderB">
> <dtml-call "manage_exportObject(id=Item)">
> </dtml-with>
>
>
> New findings:
>
> I have found that I can export SomeOtherItem from the root by calling:
> (PathToItem == FolderA and Item == SomeOtherItem)
>
> <dtml-with "_.getitem(PathToItem,0)">
> <dtml-call "manage_exportObject(id=Item)">
> </dtml-with>
>
> But if I try to set PathToItem equal to FolderA.FolderB I get a
> KeyError: FolderA.FolderB
>
>
> Any thoughts????????????????
>
> Desperate DR
>
> _______________________________________________
> 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 )
>
>