[Zope] Starting a search from the correct folder
Dieter Maurer
dieter at handshake.de
Sun Jul 3 17:48:34 EDT 2005
John Poltorak wrote at 2005-7-2 15:52 +0100:
>On Fri, Jul 01, 2005 at 08:15:20PM +0200, Dieter Maurer wrote:
>> John Poltorak wrote at 2005-6-30 22:27 +0100:
>> > ...
>> >If I want to generate a list
>> >of folders in say the 'groups' folder, how would I change the code above?
>>
>> You are aware that you will not get a list (but a tree) when you
>> look down from some starting point?
>
>I have problems with the terminology which Zope uses, but I think you
>understand what I meant.
I know now that I did not understand what you meant...
To get the subfolders of a folder, you can use its "tpValues" method.
As as you like code: it looks like "folder.tpValues()".
> ...
>> When you are ready to look up (in the hierarchy), then
>>
>> obj.aq_inner.aq_parent
>>
>> is the hierarchy parent of "obj".
>
>Well that would be useful if I understood what you meant. Is there a
>suggested explanation anywhere with some sample code which uses this
>construct?
We are on completely different wavelengths:
I do not understand your questions because they are wrapped
in (irrelevant) examples.
An you do not understand my answer
* first, because it is not an answer to your question as
I did not correctly understood this
* second, because I use abstract terms and hate examples larger
than necessary.
Had you simply asked: how can I get the list of a folder's
subfolders, my answer would have been "folder.tpValues()"
and both of us could have been happy....
--
Dieter
More information about the Zope
mailing list