Re: sorting over creation date or some getObjProperty('xyz',REQUEST)
Sebastian Tänzer <[email protected]>
| Newsgroups | gmane.comp.cms.zms.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello Nils, as far as I understand you you'd like to order your list by a special field like date, datetime etc. Why don't you use: <dtml-in "filteredTreeNodes(REQUEST, 'ZMSFolder' , 'datetime_' , 'desc' , 10 )"> ... </dtml-in> You can sort using filteredTreeNodes easily with the third parameter (order_by). We use this on http://www.bonncampus.fm/ and http://www.mondberge.com with no problems. Sorry if I missed anything and this doesn't help. Mit freundlichen Grüßen Sebastian Tänzer [tm] tänzermedien e.K. Agentur für Online-Medien Kekuléstr. 39 53115 Bonn Tel 0228-304134-0 Fax 0228-304134-99 Mobil 0174-333-7001 E-Mail [email protected] WWW http://www.taenzer.me Am 02.12.2009 um 17:47 schrieb Niels Dettenbach: > 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 > ---