[Zope] Access to DTML Document properties
Pavlos Christoforou
pavlos@gaaros.msrc.sunysb.edu
Tue, 9 Mar 1999 22:31:59 -0500 (EST)
On Wed, 10 Mar 1999, Luciano Ramalho wrote:
>
> The very reason I chose to do it with DTML Documents was to be able to
> store some special fields, such as 'author' in my example, along with the
> document. I cannot do that with DTML Methods, as they do not have properties.
>
> In Zope 1.0.9 I used folders but I was running into problems with relative
> links. It seemed natural to switch from my previous folders to the new DTML
> Documents.
You are right. I was using folders too for the same reason.
>
> I still do not know to reference the properties of a DTML Document 'A' from
> within a document or method 'B' in located in the same folder as 'A'.
You can use the PARENTS variable.
so if you have a folder which contains two DTML Documents A and B then
you can access B's properties from A by:
<!--# var "PARENTS[0].B.name"-->
PARENTS[1] will return the folder or containing object one level up and
PARENTS[-1] will return the top most Folder.
Pavlos