[Zope] [Fwd: [Zope-dev] The Spanish Aquisition]
Jason Spisak
webmaster@mtear.com
Wed, 10 Mar 1999 07:43:59 -0500
This is a multi-part message in MIME format.
--------------FC234E87DDED8B9F783D1ACF
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
--------------FC234E87DDED8B9F783D1ACF
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-ID: <36E66801.26F0DC53@mtear.com>
Date: Wed, 10 Mar 1999 07:39:29 -0500
From: Jason Spisak <webmaster@mtear.com>
X-Mailer: Mozilla 4.07 [en] (X11; I; Linux 2.0.36 i686)
MIME-Version: 1.0
To: Michel Pelletier <michel@digicool.com>
Subject: Re: [Zope-dev] The Spanish Aquisition
References: <613145F79272D211914B0020AFF6401907BB37@GANDALF>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Michel Pelletier wrote:
>
> > -----Original Message-----
> > From: Jason Spisak [mailto:webmaster@mtear.com]
> > Sent: Tuesday, March 09, 1999 4:57 PM
> > To: zope-dev@zope.org
> > 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
webmaster@mtear.com
--------------FC234E87DDED8B9F783D1ACF--