[Zope] A little help on path namespace

Ausum augusto@artlover.com
Wed, 7 Feb 2001 18:22:33 -0500


Thanks for all the responses. I think I need to clarify the question.

A  product I just built "drops" dtml-documents with empty properties at any
destination folder, at any part of the tree (as it's supossed a product to
work). The product also creates a method within a subfolder, intended to use the
properties from the correspondant dtml-document.

The product at first inquiries for an id, and then it creates both the object
and the method, both sharing the same requested id. Like this:

   any_folder.objectid                     (objectid been a document)
   any_folder.subfolder.objectid    (objectid been a method )

In addition to standard header and footer tags, each one of those two objects
has one single tag wich calls a method:

   <dtml-var doc_content>           for the document
   <dtml-var method_content>     for the method

Each one of these two "submethods"(doc_content and method_content) displays the
current object's properties, and are located at the root of the site, so they
can be called from any folder. Document 'objectid' renders nicely this way, but
I have problems with method 'objectid´, because it must use properties from an
object with the same name, but located in a previous folder. How can I do that?

I'd love to have something like this (for method_content, at the root)

<dtml-with "previous_folder_of_objectid.objectid_translated_to_namespace">
<dtml-var anyproperty>
</dtml-with>

(where, after resolving,
'the_previous_folder_of_objectid' returns the first previous folder to the one
containing the method, that is 'any_folder' )

Thanks for reading until this point. Even when I used them when creating the
product, I'm a little confused about namespace and strings stuff, so please
include an example if possible.

Thanks again,


Ausum