On Sun, 9 Apr 2000, Marco Mariani wrote:
How do I sort a "lines" property in dtml-in?
<dtml-in "myfolder.mylist">
The following will work (tested):
<dtml-call "myfolder.mylist.sort()">
Note that this will actually change the property, so that next time you view it in the management interface the contents will show up in sorted order. If that's not acceptable, you can always copy the property contents into REQUEST and sort the copy for use in the dtml-in.
....
Hmm, although the documentation of the dtml-in command led me to believe that the following would *not* work, just for a lark I tried it, and it seems to:
<dtml-in "myfolder.mylist" sort=sequence-item>
Even though this example works it doesn't seem to be a general rule of dtml-in. Because this one does not work:
<dtml-in "artikler.artikel_catalog.uniqueValuesFor('kategorier')" sort=sequence-item>
But what does and does not work when using the sort value ? And how does one sort when using the uniqueValuesFor ?
well... it DOES work. My test data just confused me because words starting with big letters like 'Horse' or Zebra comes before 'abraham' or 'bunny'. Is this a good idea ?? Generally I would prefere that 'A' and 'a' are equal when sorted. What du you think ??
I think that's exactly what you are looking for.
Anyone know the best place to send a documentation suggestion so it won't get lost? I understand from the web pages that Digital Creations is moving towarded an open system for the docs, but I don't see anyplace to send suggestions in the meantime.
--RDM
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Regards
------------------------------------------------- Anders Holmbech Nielsen | Tlf: (+45) 70 22 56 00 Software Engineer | Fax: (+45) 70 22 57 00 Integrator Uniware A/S | http:/www.integrator.dk
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Regards ------------------------------------------------- Anders Holmbech Nielsen | Tlf: (+45) 70 22 56 00 Software Engineer | Fax: (+45) 70 22 57 00 Integrator Uniware A/S | http:/www.integrator.dk