[Zope] Order by property

Andrew Fielden andrew.fielden@emotion.co.uk
Fri, 9 Mar 2001 10:37:23 -0000


Lars

Thanks for that it has taken me part way as I can certainly now create an
order for the items in the directory.

Unfortunately if I try to change the code to
<dtml-in objectValues sort=paraNum>
   <dtml-var sequence-item><br>
</dtml-in>

The code breaks telling me that
Zope has encountered an error while publishing this resource.

Error Type: KeyError
Error Value: para1.paraNum


the only change is the dtml-var for the display in the loop to sequence-item
in order to, I thought, display the object? I suspect that this is a lack of
knowledge of mine with the in built properties/methods of a DTML document
but if you/anyone can put me right I would be very grateful.

Andrew

-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Lars
Heber
Sent: 08 March 2001 18:08
To: zope@zope.org
Subject: Re: [Zope] Order by property


I think you don't need ZClasses for that.

<dtml-in objectValues sort=myprop>
   <dtml-var title_or_id><br>
</dtml-in>

This will do what you want. Just play a little with it.
I tested it only quickly.
myprop is just a property for each doc.
Methods do not have own props, but they are displayed though.



--
Lars Heber, mailto:Lars.Heber@t-systems.de          TTTTTT
                                                      TT
T-Systems, debis Systemhaus GEI GmbH              O   TT   O   O   O
                                                      TT



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