sorting over creation date or some getObjProperty('xyz',REQUEST)
Niels Dettenbach <[email protected]>
| Newsgroups | gmane.comp.cms.zms.devel |
|---|---|
| Organization | Syndicat IT&Internet |
| Message-ID | <[email protected]> |
Dear all,
may be something has an idea here for my new "News-Box" automatic object (will
go GPL when 1.0 too). From my view it usually should not difficult to sort a
list of (special-)objects by date or other fields.
How i can sort a list of ZMS objects (PAGES or PAGEEMELENTS) - i.e. from
"filteredTreeNodes()" against a (special) object property field like "creation
date" (not "bobobase_modification_time") or other fields / properties?
It seems until today Zopes dtml-in sort= is not able to work with a expression
- i.e.
<dtml-in objects sort="getObjProperty('creation_date',REQUEST)">
or even i.e.:
<dtml-in objects
sort="int(getLangFmtDate(getObjProperty('change_dt',REQUEST),lang,'%Y%m%d'))">
as Zopes sort seems not able to handle expressions here (even if there are
some patches / ideas from Zope users).
I've checked ZMS byself as i've found a "sort()" and "sort_list()" function,
but both didn't solve this (may be did not found the way to get them running
as described). "sort()" just seems to sort against the "position" on the page.
Is there any direct way to solve this or do i have to write a additional
sorting method for this?
You can see the object here in one simple configuration:
http://www.stadtradio-goettingen.de
(box ->"Aktuelle Nachrichten")
(just sorting by position on the page / in folder)
many thanks and
best regards,
Niels.
--
---
Niels Dettenbach
---
Syndicat IT&Internet
http://www.syndicat.com
T.-Muentzer.-Str. 2, 37308 Heilbad Heiligenstadt - DE
---
Kryptoinfo:
PGP public key ID 651CA20D
Fingerprint: 55E0 4DCD B04C 4A49 1586 88AE 54DC 4465 651C A20D
https://syndicat.com/pub_key.asc
---
signature.asc
(application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (GNU/Linux) iQIcBAABCAAGBQJLFpoQAAoJEM78prARigUn23UP/RJCvFgERZWBj4Mwq4l1NY6Y c9SHJjh36C+gKQGiDClWoKHHApGbrqbF2J2ANm8QMVKP0slGKLOkOPtvpsGaLxdv GsbDCyrcymafBMFxrH4Vk6MzyxzEmdzTs6H0SZJvFSQWjgDAfn0d+s/5EsxsrKZk 0djyvKQ9eVFJ/7D+9pas/28r32ubDkAPlBsAT2pfFj4ezCyiqXf4m6i19sc51aJN wXEhb4jUkiyz9WuacG1QjP2STLgRkdGKgutfx6GhrQ3cAGnVLw4L26/SAPWCXQxi +CFfxBRpSTDXZ6HNw5rXAcJ1BhegPtF/yAolnHBmCG84xNnhP7IzcywKCUZ2VA9S WEbHYeyJfV4AuYKq6RUcmAYXfo5uqPl/KvMde5Z3N/YL2G0xHyKjjjLWXzM5Uke4 tnmZETgMFvP/WFelfXlk8hevVfDT2bbiv7d11Kxx89B1/8u3HEd3oGJVCKt3q7iP 4jujGMU4+gffONyAI8wg6gBZF8B9gD5TIHTkSJxD2MaBhXqHoVYYS34jjJefQIKy t5GTJHSagilgfLumv5DNhbRBOT1idPtJQYNunThWluuhGyZWt/m2eD5SQb82iVoz zKizcjVVDO7YYZZjpE5iNGcbwc3J+VpqbzI6RfGOcTaLvzHIzemftS9ZIAZ03go3 iKO1vdUSDckv/mFYSdUv =DYuu -----END PGP SIGNATURE-----