Frank McGeough wrote:
Remote scripting?I'm confused by Zope namespaces. I'm trying to open a DTML document from a DTML method. The hierarchy is :
Members/Staff/ADocument Info/Calendar/calendar.dtml
That is, my DTML method is calendar.dtml and the document I wish to open is ADocument. How do I go about doing this? I want to get the contents of ADocument into a Python vector where it's split by it's newlines. I've tried :
<dtml-let docContents=="_.string.split(ADocument.raw,'\n')"
but that obviously doesn't work because I don't have Members/Staff in the namespace stack. I've read the DTML doc in the Zope book but it didn't have examples like this -- that is, opening arbitrary locations in the hierarchy.
Thanks.
<dtml-let docContents=="_.string.split(Members.Staff.ADocument.document_src(),'\n')"> Objects in folders act like attributes of the folder object, and therefore may be accessed using the Python dot operator in expressions. You can also add objects to the namespace using dtml-with. hth, -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>