[ZCM] [ZC] 209/ 2 Reject "dtml-tree sort is random on non-existent property"
Collector: Zope Bugs and Patches ...
zope-coders@zope.org
Mon, 11 Feb 2002 09:13:40 -0500
Issue #209 Update (Reject) "dtml-tree sort is random on non-existent property"
Status Rejected, Zope/bug medium
To followup, visit:
http://collector.zope.org/Zope/209
==============================================================
= Reject - Entry #2 by ajung on Feb 11, 2002 9:13 am
Status: Pending => Rejected
>From the docs:
"""
sort=string
Sorts the branches by the named attribute.
"""
When there is no such attribute then you can not sort by
this attribute. So this behaviour is more logical than
implicitly using another sorting order.
- aj
________________________________________
= Request - Entry #1 by Anonymous User on Feb 9, 2002 5:34 am
Take this Tree example:
<dtml-tree Content single="true" branches_expr="objectValues('Folder')" sort="displayorder">
<dtml-if "meta_type=='Folder'">
<a href="<dtml-var BASE0><dtml-var "Content.rootpath"><dtml-var tree-item-url>" target="main">
<dtml-var title_or_id></a>
<dtml-else>
</dtml-if>
</dtml-tree>
If the property 'displayorder' is missing, objects are sorted randomly each time tree is loaded. Perhaps a default alphabetic sort?
==============================================================