[Zope-CMF] refering to properties of a different object

Dieter Maurer dieter@handshake.de
Wed, 26 Sep 2001 21:38:55 +0200 (CEST)


Jens Hauser writes:
 > possibly this is a typical newbie question:
Indeed, it is.

You know the Zope book? or 

  <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>?

They cover such questions....


 > 1. How can I access properties of a dtml-document within a different dtml
 > document or method? I set a property for document A and want to read (and
 > use/print) this property in document B.

  <dtml-with expr="DifferentDocument">
    <dtml-var property>
  </dtml-with>

 > 2. Is there a possibility to "dereference" a variable so that I load another
 > dtml document and give it a html parameter on it's way like
 > "www.foo.com/test?group=whatever". How can I use this parameter as a reference
 > to a Zope object within the dtml-document "test"?
This is "Computed Object Access":

     "_[objectId]" or "_.getitem(objectId)" or
     "restrictedTraverse(objectPath)"

Please consult the above mentioned resources to find out details....


Dieter