Re: [Zope-dev] dtml-in attr request: rsort
There is already a "reverse" attribute, how would rsort differ from this? Drew Jeff Bauer <jbauer@rubic.com> said:
Hi all.
In my DocumentTemplate presentations, I frequently want to display items in reverse order. For example, dated items in reverse chronological sequence -- most recent to least recent.
I usually create an inverse attribute so the items will display in the desired order. This occurs often enough that I'd like to request a new dtml-in tag attribute: rsort.
This feature would be trivial to implement and shouldn't add any additional complexity to the current interface. Thoughts?
Jeff Bauer Rubicon Research
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Andrew Lahser wrote:
There is already a "reverse" attribute, how would rsort differ from this?
Is there a reverse sort attribute for the dtml-in tag? http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.8.html -Jeff
Jeff Bauer wrote:
Andrew Lahser wrote:
There is already a "reverse" attribute, how would rsort differ from this?
Is there a reverse sort attribute for the dtml-in tag?
http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.8.html
The guide is mistaken. Just put in a reverse as a last argument in the in tag (as I'm sure you already know), like so (taking the example from the guide): <dtml-in employees sort=name reverse> Rik
Andrew Lahser wrote:
There is already a "reverse" attribute, how would rsort differ from this?
Is there a reverse sort attribute for the dtml-in tag?
http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.8.html
Yes there is. See (next three lines together as 1 URL): http://www.zope.org/Members/ZQR/zqr/tree_view2_html?tree- c=eJyLVneEAI/iAk9bdR0FJL4vGj8blV- Ipr7QApVfFIjKryy3VY8FAGOLHUM#AAAAAAAHsyw= Or, since the chances of that URL coming out unscathed are nil, try http://www.zope.org/Members/ZQR/zqr/tree_view2_html then expand in turn the headings: Zope Quick Reference DTML Tags in [else] / in Attributes -- Duncan Booth duncan@dales.rmplc.co.uk int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3" "\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure? http://dales.rmplc.co.uk/Duncan
participants (4)
-
Andrew Lahser -
Duncan Booth -
Jeff Bauer -
Rik Hoekstra