[Zope] Output child folders in a specifc order?

JBeard@porternovelli.com JBeard@porternovelli.com
Tue, 1 Oct 2002 12:48:42 -0400


I'm using this script from the examples folder:

    <div tal:define="subfolders python:container.content.objectValues
('Folder')">
    <ul tal:condition="subfolders">
      <li tal:repeat="folder subfolders">
        <a href="folder"
           tal:attributes="href folder/absolute_url"
           tal:content="folder/title">folder id</a>
      </li>
    </ul>
    <p tal:condition="not:subfolders"><b>There are no sub-folders
here.</b></p>
    </div>

It looks in my content folder and outputs links to all folders in there.
The links come through as some random order, I want to be able to control
this order, not alpha, but a defined order:
I have 5 folders, I want to be able to tell it which ones to output 1st,
2nd, etc >> This will then form my navigation.