Re: [Zope] Sequencing pages

2005-06-29 Thread John Poltorak
On Tue, Jun 28, 2005 at 03:45:01PM -0500, J Cameron Cooper wrote:
 John Poltorak wrote:
  If I create individual pages for a website as sub folders of a sites main 
  folder, how do I control the sequence of pages if I automatically generate 
  a set of links to all the folders? I presume that under normal 
  circumstances that sequence would be in alphabetical order of object ID.
 
 The standard folder lists its contents in unspecified order. In 
 practice, it's in order of creation (I think.)

Creation date sequence seems to explain the order I'm seeing.

 
 You can get ordered folders, which support changing the order. In fact, 
 one ships with Zope in recent versions. Look for Folder (Ordered).
 
I've often wondered what 'Folder (Ordered)' was for. 

Is there an example of its usage I can take a look at anywhere? 
 
   --jcc
 -- 
 Building Websites with Plone
 http://plonebook.packtpub.com/
 
 Enfold Systems, LLC
 http://www.enfoldsystems.com


-- 
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] Sequencing pages

2005-06-29 Thread J Cameron Cooper

John Poltorak wrote:

On Tue, Jun 28, 2005 at 03:45:01PM -0500, J Cameron Cooper wrote:


John Poltorak wrote:

If I create individual pages for a website as sub folders of a sites main 
folder, how do I control the sequence of pages if I automatically generate 
a set of links to all the folders? I presume that under normal 
circumstances that sequence would be in alphabetical order of object ID.


The standard folder lists its contents in unspecified order. In 
practice, it's in order of creation (I think.)



Creation date sequence seems to explain the order I'm seeing.

You can get ordered folders, which support changing the order. In fact, 
one ships with Zope in recent versions. Look for Folder (Ordered).
 
I've often wondered what 'Folder (Ordered)' was for. 

Is there an example of its usage I can take a look at anywhere? 


Make one on your box and look at it. It's not like you can't just delete it.

--jcc

--
Building Websites with Plone
http://plonebook.packtpub.com/

Enfold Systems, LLC
http://www.enfoldsystems.com
___
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] Sequencing pages

2005-06-28 Thread J Cameron Cooper

John Poltorak wrote:
If I create individual pages for a website as sub folders of a sites main 
folder, how do I control the sequence of pages if I automatically generate 
a set of links to all the folders? I presume that under normal 
circumstances that sequence would be in alphabetical order of object ID.


The standard folder lists its contents in unspecified order. In 
practice, it's in order of creation (I think.)


You can get ordered folders, which support changing the order. In fact, 
one ships with Zope in recent versions. Look for Folder (Ordered).


What I did before ordered folders was to give each object a property 
(like 'sort_order') with an integer value designating it's place, and 
then sort the list on that property. Not terribly efficient, though 
using the catalog would help.


--jcc
--
Building Websites with Plone
http://plonebook.packtpub.com/

Enfold Systems, LLC
http://www.enfoldsystems.com
___
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] Sequencing pages

2005-06-27 Thread Nikko Wolf

John Poltorak wrote:
If I create individual pages for a website as sub folders of a sites main 
folder, how do I control the sequence of pages if I automatically generate 
a set of links to all the folders?


See the FileLibrary example, probably located at: 
http://localhost:8080/Examples/FileLibrary


It's not obvious how it does its multi-column sorting unless you study 
it quite a bit, though, so keep reading until it makes sense.  Go 
through the ZMI and look at the getFiles script (and others).



 I presume that under normal circumstances that sequence would be in 
alphabetical order of object ID.


That's not a presumption I'd make at all, but not unlikely.


___
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] Sequencing pages

2005-06-27 Thread Dieter Maurer
John Poltorak wrote at 2005-6-25 13:46 +0100:
If I create individual pages for a website as sub folders of a sites main 
folder, how do I control the sequence of pages if I automatically generate 
a set of links to all the folders? I presume that under normal 
circumstances that sequence would be in alphabetical order of object ID.

Then you sort as appropriate.

Python's list objects have a sort method.

Zope has a module sequence with a versatile sort function, documented
in the embedded online help ;-)


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


[Zope] Sequencing pages

2005-06-25 Thread John Poltorak

If I create individual pages for a website as sub folders of a sites main 
folder, how do I control the sequence of pages if I automatically generate 
a set of links to all the folders? I presume that under normal 
circumstances that sequence would be in alphabetical order of object ID.


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