Message-ID: <40FCA7A1.4080900@zeomega.com>
Date: Tue, 20 Jul 2004 10:33:29 +0530
From: harshad behere <hbehere@zeomega.com>
User-Agent: Mozilla Thunderbird 0.5 (X11/20040208)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: cyrj@cyr.info
Subject: Re: [Zope] restrictedTraverse Info
References: <40FC3054.8090204@cyr.info>
In-Reply-To: <40FC3054.8090204@cyr.info>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Jonathan Cyr wrote:

> Hello,
>
> I keep reading about restrictedTraverse, is there a resource with a 
> simple introduction and/or example of using this tool?
>
> Google doesn't yield any overviews, just specific questions.
>
> I have a problem were I have a path of a photo stored, but I'd like to 
> get the title as well... This tool seems to do that, but I don't know 
> the usage.
>
> -Jon Cyr
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
hi,
yes you can get title property. try following python scripts lines,

PATH = '/yourphotofolder/yourphotoid'
photoRef = context.restrictedTraverse( PATH )
phototitle = photoRef.getProperty('title')

harshad

-- 
Harshad Behere

ZeOmega (www.zeomega.com)
Open Minds' Open Solutions

20/21,Rajalakshmi Plaza,
South End Road,
Basavanagudi
Bangalore-560 004
India


