[Zope] Output child folders in a specifc order?
Fearless Froggie
fearless_froggie@yahoo.com
Tue, 1 Oct 2002 11:21:29 -0700 (PDT)
Hi,
(Disclaimer: I'm a complete newbie to zope as well as
Python!)
I created something similar to what you want to do --
a two level order menu based on what child folders are
available.
I assigned an "order" property to each folder. Then I
crawl through my "folder" tree, get the title, id,
order number, url (and whatever other information I
want) for each folder, put that into a tuple, then put
that tuple into a list.
Then I sort the list. If "order" is the first value in
each tuple, the folders will be ordered by the "order"
value.
Then I can print out that ordered list of folders
anyway I like.
Disadvantages: If you have a lot of child folders,
it's hard to tell what order they're in. You'd have to
view the properties of each child to see it's "order"
value.
The dream would be to create a custom management view
of your folders that displays the order value of each
folder. Then you could view and change them all at
once. You could also create columns to display and
edit other properties of interest. That would make it
very easy for non-programmers to add folders and
reorder them as they like.
But like I said, I'm a complete newbie and this was my
first zope/python script. I haven't attached it cause
it's not pretty. But if you want to see it I'll send
it to you.
Rita.
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com