[Zope] Starting a search from the correct folder

2005-06-30 Thread John Poltorak


I have some code which here:-

>
  PARENT TITLE OR
ID 


  
SUB-OBJECT TITLE OR ID



which automatically generates links to a number of folders which is 
exactly what I want. Understanding that Zope could do something like this 
has taken me quite a bit of time, although I still don't understand how 
this code works. What it actualy does is list the folders in the current 
folder and then allows me to select one which generates a subsequent list.
What I'd like to do is skip the first list. If I want to generate a list 
of folders in say the 'groups' folder, how would I change the code above?


-- 
John


___
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 )


Re: [Zope] Starting a search from the correct folder

2005-06-30 Thread Andreas Jung



--On 30. Juni 2005 22:27:37 +0100 John Poltorak <[EMAIL PROTECTED]> wrote:




I have some code which here:-

>
  PARENT TITLE OR
ID 


  
SUB-OBJECT TITLE OR ID



which automatically generates links to a number of folders which is
exactly what I want. Understanding that Zope could do something like this
has taken me quite a bit of time, although I still don't understand how
this code works. What it actualy does is list the folders in the current
folder and then allows me to select one which generates a subsequent list.
What I'd like to do is skip the first list. If I want to generate a list
of folders in say the 'groups' folder, how would I change the code above?



What is your real problem? I've read the posting three time and I not still 
not getting to the point what you mean.


-aj


pgpr4y13F2PCb.pgp
Description: PGP signature
___
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 )


Re: [Zope] Starting a search from the correct folder

2005-07-01 Thread Dieter Maurer
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?

When you are ready to look up (in the hierarchy), then

 obj.aq_inner.aq_parent

is the hierarchy parent of "obj".

-- 
Dieter
___
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 )


Re: [Zope] Starting a search from the correct folder

2005-07-01 Thread Nikko Wolf

Dieter Maurer wrote:


You are aware that you will not get a list (but a tree) when you
look down from some starting point?



I suspect he meant a list in the HTML - he is using  and  tags 
there.


But Dieter, can you elaborate on what you mean?  Isn't the result from 
objectValues() a tuple [which would be a "list" in most languages].


Do you simply mean that the Folder objects may contain File, Document, 
Image or Folder objects, recursively?  If not I'm not sure I follow.


Thanks,
N

___
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 )


Re: [Zope] Starting a search from the correct folder

2005-07-01 Thread Nikko Wolf

Andreas Jung wrote:



--On 30. Juni 2005 22:27:37 +0100 John Poltorak <[EMAIL PROTECTED]> wrote:


I have some code which here:-


  
SUB-OBJECT TITLE OR ID




What I'd like to do is skip the first list. If I want to generate a list
of folders in say the 'groups' folder, how would I change the code above?



What is your real problem? I've read the posting three time and I not 
still not getting to the point what you mean.


John, I'm not sure what you mean either -- but if my guess *is* right, 
try changing the two occurrances of "context" to "context.groups"


Nikko
___
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 )


Re: [Zope] Starting a search from the correct folder

2005-07-02 Thread John Poltorak
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.

 
> 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?

 
> -- 
> Dieter


-- 
John


___
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 )


Re: [Zope] Starting a search from the correct folder

2005-07-02 Thread Andreas Jung



--On 2. Juli 2005 15:52:52 +0100 John Poltorak <[EMAIL PROTECTED]> wrote:





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?



This construct returns the *hierarchy* parent vs. the *acquisiton* parent.
See Zope Dev Guide for details on Acquistion.

-aj




pgpTEbHNKuIc2.pgp
Description: PGP signature
___
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 )


Re: [Zope] Starting a search from the correct folder

2005-07-02 Thread John Poltorak
On Sat, Jul 02, 2005 at 05:03:06PM +0200, Andreas Jung wrote:
> 
> 
> --On 2. Juli 2005 15:52:52 +0100 John Poltorak <[EMAIL PROTECTED]> wrote:
> 
> >
> >
> >> 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?
> >
> 
> This construct returns the *hierarchy* parent vs. the *acquisiton* parent.
> See Zope Dev Guide for details on Acquistion.

I looked and saw numerous broken links but no sample code.

It's only sample code which actually creates any meaning to many of these 
explanations.

 
> -aj
> 
> 


-- 
John



___
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 )


Re: [Zope] Starting a search from the correct folder

2005-07-03 Thread Dieter Maurer
Nikko Wolf wrote at 2005-7-1 15:40 -0600:
>Dieter Maurer wrote:
>> 
>> You are aware that you will not get a list (but a tree) when you
>> look down from some starting point?
>>
> ...
>But Dieter, can you elaborate on what you mean?  Isn't the result from 
>objectValues() a tuple [which would be a "list" in most languages].

The poster described his aim *very* vaguely -- by an
example that can be interpreted in different ways.

I concentrated on the "PARENTS[...]" part of the example.
It could mean that the poster is interested in part of
a path but it unhappy with the point where the path starts.

Now, if I choose a point and look upward, I see a single path,
however, when I look downward, I usually see more than one.

>Do you simply mean that the Folder objects may contain File, Document, 
>Image or Folder objects, recursively?  If not I'm not sure I follow.

Is the explanation above enough to explain what I meant?

-- 
Dieter
___
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 )


Re: [Zope] Starting a search from the correct folder

2005-07-03 Thread Dieter Maurer
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
___
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 )