Subject: Re: [Zope-dev] The Spanish Aquisition
From: Jason Spisak <[email-masked]>
To: Michel Pelletier <[email-masked]>
Date: Wed, 10 Mar 1999 07:39:29 -0500

Michel Pelletier wrote:
> 
> > -----Original Message-----
> > From: Jason Spisak [mailto:[email-masked]]
> > Sent: Tuesday, March 09, 1999 4:57 PM
> > To: [email-masked]
> > Subject: [Zope-dev] The Spanish Aquisition
> >
> >
> > Zopistas,
> >
> > I am trying to reference a property of a Folder that is in a totally
> > spearate hirearchy of Zope. When inserted below the folder
> > Iwish to grab
> > the property of it works fine, but when moves elsewhere it dies.
> >
> > <!--#var standard_html_header-->
> > <!--#var "_['candidate1'].name"-->
> > <!--#var standard_html_footer-->
> >
> 
> Hmm.. I'm not sure I understand the problem you want to solve, but have
> you tried:
> 
> <!--#var name-->

Yes.  I am trying to reference a folder that is not in the same path.
And I tried your next suggestion a long time ago, with no luck. 
<!--#var candidate1.name-->, and get an error with traceback:

<!--
Traceback (innermost last):
  File lib/python/ZPublisher/Publish.py, line 877, in publish_module
  File lib/python/ZPublisher/Publish.py, line 590, in publish
    (Info:
/staff/companies/company1/job_order1/submission1/job_order_exp)
  File lib/python/OFS/DTMLMethod.py, line 155, in __call__
    (Object: job_order_exp)
  File lib/python/OFS/DTMLMethod.py, line 151, in __call__
    (Object: job_order_exp)
  File lib/python/DocumentTemplate/DT_String.py, line 513, in __call__
    (Object: job_order_exp)
KeyError: (see above)

-->)

> 
> If the folder is one of your ancestors (ie above you and in your path)
> you can just reference it's attributes like they were your own.  If the
> folder you are targeting is above you but not in your path (ie not an
> ancestor) but is a child of one of your ancestors, you must first aquire
> the folder, and then reference it's property, like this:
> 
> <!--#var candidate1.name-->
> 
> The rule is:
> If a folder is an ancestor of yours, you can just say <!--#var
> propertyname-->
> If a folder is a child of one of your ancestors, but not one of your
> ancestors (like a cousin), you can say <!--#var
> foldername.propertyname-->, because you must first aquire the folder.
> 

This doesn't work.  My paths are like, /staff/candidates/candidate1, and
staff/companies/company1/job1/submission1/MyDocument.  I am trying to
reference a property of the candidate1 folder in the MyDocument
document.

Thanks for your time Michel.

Jason Spisak
[email-masked]