I know there is an active bug report on the tree tag using the sort option when not all items in the current folder have a property and that propert is used as a sort key... My problem is a bit simpler -- I have a jested group of folders ( say A, B, and C) enclosed in a folder (say OUTER). The structure is OUTER A B C which I am trying to render <dtml-tree OUTER sort="displayOrder"> <dtml-var title_and_id> </dtml-tree> I have set a property 'displayOrder" for each of the folders A, B, and C using the ZMI. (In the real world it gets set programmatically, but ...) Assuming that the sorting were to occur, I want the order to be B, C, A and have set the displayOrder values appropriately as strings. Running the progam fragment in a wrapper generates the error: Attribute Error: displayOrder with a reference in TreeTag.py where displayOrder is used in a getattr() call. Are properties not attributes of an object? What's the problem?
Hi Dennis, On Fre, 2002-07-05 at 20:32, Dennis Allison wrote:
<dtml-tree OUTER sort="displayOrder"> <dtml-var title_and_id> </dtml-tree>
[ ... ]
Attribute Error: displayOrder
with a reference in TreeTag.py where displayOrder is used in a getattr() call. Are properties not attributes of an object? What's the problem?
have you tried <dtml-tree OUTER sort=displayOrder> already? (without the quotes)? Another option would be to define a method that retrieves "displayOrder" from your objects and use sort_expr="<methodName>" instead. HTH, Igor -- ScanPlus GmbH NOC Ulm - Germany - Griesbadgasse 7-13 - D 89073 Ulm TEL +49 731 920 13 100 - FAX +49 731 920 13 290 eMail: support@scan-plus.de Amtsgericht Ulm - HRB3220 - Geschaeftsfuehrer: Juergen Hoermann
participants (2)
-
Dennis Allison -
Igor Stroh