aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-02-08 19:48:00 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-02-08 19:48:00 +0000
commit1eb59c47606c733be40cbf8923fb00b3210cc667 (patch)
tree711d36a2a3ac6e96566de7af1a78df02c70e0e04 /doc
parent2c3eceab34808a0efccc883a968ff1198b2f4596 (diff)
downloadikiwiki-1eb59c47606c733be40cbf8923fb00b3210cc667.tar
ikiwiki-1eb59c47606c733be40cbf8923fb00b3210cc667.tar.gz
* Add "reverse" option to inline to invert sort orders.
Diffstat (limited to 'doc')
-rw-r--r--doc/patchqueue/inline_-_sort_by_old_first.mdwn29
-rw-r--r--doc/plugins/inline.mdwn1
2 files changed, 1 insertions, 29 deletions
diff --git a/doc/patchqueue/inline_-_sort_by_old_first.mdwn b/doc/patchqueue/inline_-_sort_by_old_first.mdwn
deleted file mode 100644
index 9054beadc..000000000
--- a/doc/patchqueue/inline_-_sort_by_old_first.mdwn
+++ /dev/null
@@ -1,29 +0,0 @@
-Quick hack to be able to list old entries first :
-
-
- --- inline.pm 2007-01-18 18:21:27.000000000 +0100
- +++ /usr/share/perl5/IkiWiki/Plugin/inline.pm 2007-01-18 18:23:01.000000000 +0100
- @@ -92,6 +92,9 @@
- elsif (! exists $params{sort} || $params{sort} eq 'age') {
- @list=sort { $pagectime{$b} <=> $pagectime{$a} } @list;
- }
- + elsif (! exists $params{sort} || $params{sort} eq 'old') {
- + @list=sort { $pagectime{$a} <=> $pagectime{$b} } @list;
- + }
- else {
- return sprintf(gettext("unknown sort type %s"), $params{sort});
- }
-
-
-this patch adds a new type of sort "old".
-
-> Hmm, take another look at your patch above. Comapre the added lines with
-> the "age" lines just above them. It's identical; age already does what
-> you want. --[[Joey]]
-
->> Well, $b and $a are switched in 'old' comparing to 'age'... According to the documentation, *The default, "age" is to sort newest pages first*. I just want the reverse, and that's why I just switched the $a and $b args of the sort func.... --HB
-
-However, I wonder if it would be better to add another option for inline like "sortorder" with "desc" or "asc" keywords ?
-
-> That might be cleaner, since it would allow sorting pages in reverse by
-> title. If someone ever had a reason to do that. --[[Joey]]
diff --git a/doc/plugins/inline.mdwn b/doc/plugins/inline.mdwn
index cd76fd286..8b8241ca2 100644
--- a/doc/plugins/inline.mdwn
+++ b/doc/plugins/inline.mdwn
@@ -46,3 +46,4 @@ directive:
itself).
* `sort` - Controls how inlined pages are sorted. The default, "age" is to
sort newest pages first. Setting it to "title" will sort pages by title.
+* `reverse` - If set to "yes", causes the sort order to be reversed.