[Zope] How to correctly use the PARENTS object?

Gerrie Roos gerrie@trispen.com
Mon, 23 Apr 2001 10:51:43 +0200


I've struggled with this long enough to justify asking help...I've been
through the manuals, FAQ's etc, but somehow my understanding of PARENTS
object is incomplete...

I have the following directory structure:

Bugs
        Interface
                Insert
                        sendMail - a DTML Document
                BugsMail
                        getRecipients - a Z SQL Method

I'd like to call and iterate over the results of getRecipients from
sendMail.  So I tried the following in sendMail:

<dtml-in PARENTS[1].BugsMail.getRecipients>
        <dtml-var someFieldReturnedByGetRecipients>
</dtml-in>

...and I get a KeyError for PARENTS[1].BugsMail.getRecipients....

I tried various other options (albeit somewhat blindly/desparately), eg.
putting the whole PARENTS thing in an expression, etc...What am I
missing?

What other options are there to traverse a path in a dtml-statement, or
to do what I want to do here?

Please help, I'm pretty new to this...