]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/add_forward_age_sorting_option_to_inline.mdwn
thanks for response; follow-up; I've got something working…
[ikiwiki.git] / doc / todo / add_forward_age_sorting_option_to_inline.mdwn
1 The names are a bit backwards, but I guess inverting the sense of age would make people angry :-)
2
3 I do not believe copy-and-paste of 3 lines is copyrightable, but in any case feel free to include in ikiwiki under the same terms.
4 [[DavidBremner]]
5
6 You can already do do sort=age reverse=yes [[done]] --[[Joey]]
7
8 <pre>
9 From 2fb2b561a678616bb0054a2d7a9d29df11998bc2 Mon Sep 17 00:00:00 2001
10 From: David Bremner <bremner@pivot.cs.unb.ca>
11 Date: Fri, 29 Aug 2008 15:05:41 -0300
12 Subject: [PATCH] add sort='youth' to inline plugin
13
14 ---
15  IkiWiki/Plugin/inline.pm |    3 +++
16  1 files changed, 3 insertions(+), 0 deletions(-)
17
18 diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
19 index d2e5832..9e52712 100644
20 --- a/IkiWiki/Plugin/inline.pm
21 +++ b/IkiWiki/Plugin/inline.pm
22 @@ -194,6 +194,9 @@ sub preprocess_inline (@) {
23         elsif (! exists $params{sort} || $params{sort} eq 'age') {
24                 @list=sort { $pagectime{$b} <=> $pagectime{$a} } @list;
25         }
26 +       elsif (! exists $params{sort} || $params{sort} eq 'youth') {
27 +               @list=sort { $pagectime{$a} <=> $pagectime{$b} } @list;
28 +       }
29         else {
30                 return sprintf(gettext("unknown sort type %s"), $params{sort});
31         }
32 --
33 1.5.6.3
34 </pre>