Sorting mod.time with dtml-in?
I thought that I could simply sort by modification time withe the following: <dtml-in expr="subdir.objectValues()" sort="bobo_modification_time"> but as it seems I am to stupid to understand Zope/Python, because this does not work :( Any hints? Thanks Kai -- Institut für Seeverkehrswirtschaft und Logistik http://www.isl.org/ Dipl.-Inform. Kai Hofmann mailto:hofmann@isl.org Universitaetsallee GW1 Block A phone:+49 421 22096-83 D-28359 Bremen fax:+49 421 22096-55
On Thursday 03 May 2001 15:11, Kai Hofmann wrote:
I thought that I could simply sort by modification time withe the following:
<dtml-in expr="subdir.objectValues()" sort="bobo_modification_time">
but as it seems I am to stupid to understand Zope/Python, because this does not work :( Any hints?
shouldn't it be <dtml-in expr="subdir.objectValues()" sort=bobobase_modification_time> ? hth
Thanks
Kai
<dtml-in expr="subdir.objectValues()" sort="bobo_modification_time">
but as it seems I am to stupid to understand Zope/Python, because this does not work :( Any hints?
shouldn't it be <dtml-in expr="subdir.objectValues()" sort=bobobase_modification_time>
Thanks that works :))) Another question - how to reverse (descent) the sort order??? Thanks again Kai -- Institut für Seeverkehrswirtschaft und Logistik http://www.isl.org/ Dipl.-Inform. Kai Hofmann mailto:hofmann@isl.org Universitaetsallee GW1 Block A phone:+49 421 22096-83 D-28359 Bremen fax:+49 421 22096-55
On Thursday 03 May 2001 15:34, Kai Hofmann wrote:
<dtml-in expr="subdir.objectValues()" sort="bobo_modification_time">
but as it seems I am to stupid to understand Zope/Python, because this does not work :( Any hints?
shouldn't it be <dtml-in expr="subdir.objectValues()" sort=bobobase_modification_time>
Thanks that works :))) Another question - how to reverse (descent) the sort order???
Thanks again
Kai chuck in reverse <dtml-in expr="subdir.objectValues()" sort=bobobase_modification_time reverse>
"bak (kedai)" wrote:
On Thursday 03 May 2001 15:11, Kai Hofmann wrote:
I thought that I could simply sort by modification time withe the following:
<dtml-in expr="subdir.objectValues()" sort="bobo_modification_time">
but as it seems I am to stupid to understand Zope/Python, because this does not work :( Any hints?
shouldn't it be <dtml-in expr="subdir.objectValues()" sort=bobobase_modification_time> ?
hth
Thanks
Kai
Assuming version 2.3, try: <dtml-in expr="subdir.objectValues()" sort_expr="bobo_modification_time()"> since it is a method. hth, -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
Assuming version 2.3, try:
<dtml-in expr="subdir.objectValues()" sort_expr="bobo_modification_time()">
since it is a method.
hth,
what's the difference between using sort and sort_expr? the sort=something has been there since forever :) and i have been using it in my codes. is it something bad? thanks
"bak (kedai)" wrote:
Assuming version 2.3, try:
<dtml-in expr="subdir.objectValues()" sort_expr="bobo_modification_time()">
since it is a method.
hth,
what's the difference between using sort and sort_expr? the sort=something has been there since forever :) and i have been using it in my codes. is it something bad?
thanks
No, that should work. The lack of quotes tells Zope it is a named attribute, so it will call it properly when it is a method like above. sort_expr lets you sort by a Python expression. You way is probably best though in this case. -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
participants (3)
-
bak -
Casey Duncan -
Kai Hofmann